Append With Items Results
Seamlessly integrate "With Items" task results into your original list.
Use case
You're dealing with nested data structures and need to extract results from tasks ran "With Items" into your original list. You want a unified, easy-to-manipulate list that includes all necessary data.
Overview
The Process With Items Results
transform enables effective incorporation of "With Items" task results into your original list. It bridges the gap between the collected results and the original list, making your data manipulation tasks simpler and more efficient.
Parameters
Base List
This is the main list to which you want your collected results to be appended.
Collected List
This is the list of results from your completed With Items
task, from which the nested result.result
attribute will be extracted.
Attribute Name
This is the name you'd like to set for the new attribute to be appended to the Base List
.
Usage
The below scenario will attempt to illustrate how the Process With Items Results
transform can be utilized to simplify With Items
results collection.
Input Lists
Assume we have a base list called base_list
:
And we ran a With Items
task against this list to collect additional data from these items that's stored in a new list called collected_list
that includes result.result
attributes like this
Action Parameters:
We want to extract the result.result
list from each item in the collected_list
and append it to each corresponding item in the base_list
as a new attribute named hobbies
.
Jinja2 Equivalent:
Results Output
After processing, your results will look like this:
Having understood the Process With Items Results
transform, you're now capable of seamlessly integrating data from one list to another. Remember to carefully specify your Collected List
, Base List
, and Attribute Name
to ensure a successful transformation.
Last updated