Skip to main content

Is there any way to put a merge inside a merge? I want to recursively call an action sequence to ‘loop’ through all the rows, but that would require something like:

{{$Model.myModel.data.{{rowcounter}}.myField}}


That doesn’t seem to work though - is there anyway to dynamically insert the row number?


Thanks!

That would be nice - wouldn’t it. Unfortunately our merge processor is not that smart.

You’ll have to find some other way to iterate through the rows on the model.

Depending on what you are trying to do in your sequence - you should simply be able to pass {{myField}} into the action - and context will be correct. But if you are creating new rows in your action - that will start failing - cuz context jumps to the new row.


This quickly starts to get to the place where a simple JS snippet becomes more straightforward than the nested set of action sequences you have to build to do this sort of iteration. There are plenty of examples on the community of that sort of thing.


Thanks, I assumed as much but thought I’d ask. Definitely can do via JS, but building for client and trying to leave it as declarative as possible for them…


Reply