Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Loop through repeating subform.

Avatar

Former Community Member
I have a form that uses instance manager to have 1 or many subform instances. I want to dynamically loop through these fields in a WorkFlow QPAC (SQL or SetValue) using a counter... something like this:



process_data/formvar/form-data/data/xdp/datasets/data/wcf/detail['/process/@counter']/txtField



where I can increment '/process/@counter'



This sort of works but it only ever grabs the first element even though I've proven the counter is incrementing.
2 Replies

Avatar

Former Community Member
I found the solution internally. Try adding 0 to the counter to basically "encourage" it to be an integer. So from the above example:



process_data/formvar/form-data/data/xdp/datasets/data/wcf/detail[/process_data/@counter + 0]/txtField

Avatar

Level 2
Thanks for letting us know the solution you found.



Mike