February 14, 200323 yr I have a program that has calculations that require scripts to activate them. Example: "select_rate" script If["rate_code = "4"] Perform script[sub-script, "rate_misc_1"] Halt script End If If["rate_code = "5"] Perform script[sub-script, "rate_misc_2"] Halt script End If I have about 20 of these if statements running in the "select_rate" script "rate_misc_1" script Enter browse Mode set field ["rate_misc_1", "price *.10"] rate_code is a calculation that states if the name of the rate is "name", then use this Code #. Example: Rate = "10% Min 100", 2 Rate = "10% Misc", 4 and so on. The rate_code is based on a value list I have setup with all the names of the rates. My question is this: Do I have this setup right, or is there an easier way to achieve a value from a rate_code that is matched up with the price of the product? Any help on this would be appreicated.
February 14, 200323 yr Why do you need a script for this? Have you considered using just a plain calc field that references the rate? You could store your rates in a related file through the relationship ratename::ratename and then your calc field could be price*ratename::rate To keep your figures from changing in the event you will alter rates at some later date, you could define a lookup rate field in your master file and use this as a reference in your calc field. HTH -Raz
Create an account or sign in to comment