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:
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
Nothing wrong in your script. But you should make the variable writes / initialization through JavaScript Code element. Use the same code in a JavaScript Code element and it should work.
Glyn Costello selected this answer as the correct 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.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.