{{#webResponse.body.virtualVersions}}
{{#if(equals(id, versionID))}}
{{customFields.69a18668c0678ghr67iygh}}
{{/}}
{{/webResponse.body.virtualVersions}}
here versionID is my variable created. I want to pass this dynamically. But it's not rendering the variable value. The rule runs successfully but fails to fetch the value needed.
Hi @Ramya R
Short answer: that is not possible, and a workaround is needed.
For a long-format iterator in automation rules, such as {{#someList}} do something {{/}} only data from the iterator scope, and lower, is accessible. No outside data such as a created variable can be seen inside the iteration. This is a long-standing limitation of such iterators, and I recall there are several suggestions and defects for the symptom in JAC.
There are two possible workarounds for your scenario, depending upon if your virtualVersion's ID values are unique in the web response: dynamic list searching, or a dynamic lookup table.
#1) Dynamic List searching methods (This works for unique or non-unique ID values.)
#2) Dynamic Lookup Table (This only works for unique ID values.)
Please try one of those approaches and then let me know what happens. Thanks!
Kind regards,
Bill
-
Welcome to the community. input and suggestions are right on the point, I totally agreed with him.
The key thing that you need to ensure where your variables are defined because some variables will not be available outside the section of your automation rule setup.
Looking forward to your findings.
Best, Joseph Chung Yin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.