RPE 6.0.6.1 - Iterate though each DNG custom attibute and assign to a variable
Hi,
I am trying to iterate through custom attributes in DNG using script expression and assign the value or literal name to an RPE variable for use in the document.
I have created a container with the custom attribute query
I have created multiple "assignments" in format:
if (name == "My Custom Attribute 1") {_MyCustomVariable1 = value;}
However, in debug mode, each time the query goes to the next custom attribute, the value of all the variables are cleared.
e.g. query is on Atr 1, sets the value of Var 1, then on Atr 2 it sets te value of Var 2, but clears Var 1.
I think perhaps my script is wrong. Any help?
Accepted answer
One other answer
Glyn,
You should to it different way:
1) Create a condition on a container that when name == "My Custom Attribute 1"
2) Under thins container add next container that is assigning the value to your customer variable.
Be aware the containers can have conditions and assignments except standard code that is executed inside of them.