Iterate next

This action allows executing the next action in the workflow repeatedly with each element of the specified list.

With each iteration, the variable {PREVIOUS} is filled with the element from the given list, and the next action in the workflow is executed. After executing the action the engine takes the next element of the list. So, the action is executed repeatedly until the end of the list or the specified limit on iterations is reached.

Iterate next – workflow for WordPress action

Iterate next – workflow for WordPress action

If the specified variable is a multilevel list, for instance, a list of posts data, the variable {PREVIOUS} in the next action is a list too. So, to get a post title use the variable {PREVIOUS[post_title]}.

You can use this action with any trigger or the previous action in the workflow that produces a list of items: the Bulk action trigger for admin post screens, the Get list of posts action to go through of the list of posts, the Get list of files to copy them with the File copy action or work with storage records that retrieved with Lookup record.

An example of this action is a sitemap generated by a workflow on the Documentation table of contents page. You can easily import that workflow by using the following link on the Tools page: Documentation – table of contents.

NB: If you need to display a list on the web page, you can use a less complex action Format list. It generates a nice view of a list.


No Comments

Sorry, the comment form is closed at this time.