October 28, 200520 yr If I have a script that needs to address field1, field2, field3, field4 (all numbered sequentially) can I have the script act on those fields using a scriptparamter ? so.. to address the first field, i would set scriptparameter=1 then in the script: if ( table::field&get(scriptparameter) = 4; "") if not that way, is there some way to achieve this ? also.. could I address repetitions of a repeating field with a script parameter if(table::repeatingfield[get(scriptparatmer)])=4 ; "" ??
October 28, 200520 yr You could do the addressing by using the GetField function. For example, using a variable to carry the field name. SetVariable[$$fieldname;Value;"table::field" & Get(ScriptParameter)] If [GetField($$fieldname) = 4;""] will, I think do the trick. Regarding repeating fields you simply put the formula into the repetition brackets [ ] in the calculation dialog box. FMP8A will happily accept this - so long as it is a valid calculation.
Create an account or sign in to comment