Create Variables Dynamically
I need to create as many local variables in a script for data transfer as there are fields in a recurring import. Is there a scripted code that will let you create variables in a loop sequence without dialog?
Ya its possible with the help of Looping
just follow below the steps
exit loop(if $x>ur required condition)
set variable($VarNm,Value:Value: "$$VarNm" & $x).
$$VarNm is the actually dynamic variable that are going to set on each step.
here u can set each variable's value on ur requirment.
Try it i think it gives u the result.
You might want to use a Variable in array format for this by putting each value in a different repetition of the same variable or in a list.
But capturing the field names and values in the first place won't necessarily be easy. I think I need to read your other post on that subject to see what you need to do there before going into more detail.
PS. if your really do want to create variable dynamically, it can be done, but it's not trivial nor is the code needed to then extract the code using an indirect reference once it's done as the script won't know the names of these variables either. Setting up a list or array of values in the same variable will be much simpler to work with.
Retrieving data ...