November 8, 200520 yr Hi all, I'd like to know if it's possible to dynamically call out the target field in the SetField [ ] step. Specifically, I want the step to get the target field name from an optional script parameter. Thanks in advance.
November 8, 200520 yr Sorry Kent, this is not possible within the Set Field[] script step. You could do some branching in the script to choose a Set Field[] with the correct target field. If [ get(scriptparameter) = "Name Last" ] Set Field [ Name Last ; gText ] Else If [ get(scriptparameter) = "Name First" ] Set Field [ Name First ; gText ] ... Edited November 8, 200520 yr by Guest
November 8, 200520 yr Author Hi Ender, Yeah, that's what I figured the answer would be...too bad...it would allow a greater level of abstraction in script writing. It would be nice to see FM add this feature in a future version. Thanks!
November 8, 200520 yr You can also put all relevant fields on a single layout and loop through them, testing whether the script parameter equals the active field name and setting the current field (by not specifying a target field) when the test is true. Depending on the number of fields involved, this can reduce the number of script steps dramatically and is somewhat more abstract and dynamic.
November 8, 200520 yr Author Hi -Queue-, Thanks for the idea! I think that'll accomplish what I want.
Create an account or sign in to comment