sub-playbook looping behavior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sub-playbook looping behavior

L1 Bithead

Do sub-playbooks self loop on arrays or just lists?

 

I can get a sub-playbook to loop “for each input” of a list, but not an array of the same data. 

 

Thx

Brian R.
3 REPLIES 3

L4 Transporter

Hey there,
than there might be something wrong with your data, an array and a list should look the same in the context data.
So you might need to use a transformer to adjust the input

Thanks for the response.
 
If the obligatory basic ${array} or defined list "Looks Like":
 
[
"abc123",
"def456",
"ghi789"
]
 
Would that appear to be the correct format? I sent this to the sub-playbook every way that I could think of and it still only touches the sub-playbook once.  I've tried various formats.  The documentation suggests that it needs to be JSON, which might be more like:
 
[
"varName": "abc123",
"varName": "def456",
"varName": "ghi789"
]
 
... or this:
 
[
{"varName": "abc123"},
{"varName": "def456"},
{"varName": "ghi789"}
]
 
... or overthinking it and it should simply be this:
 
["abc123","def456","ghi789"]
 
I'd like to know what data format a sub-playbook will loop.  I've had no issue addressing complex data for other playbook uses, but not a sub-playbook loop.
 
The documentation has no explicit documentation and video examples are hard to study.  My native format of data is more complex of course, but I've boiled it down to samples literally just like this just to see if it will loop.  
 
Clearly, I have a syntax issue.  I just need a clear example of data that will loop.
 
 
Thanks

 

Brian R.

L4 Transporter

Hi again,

 

well, I guess it does not really matter, the "for each input" loop needs an itemizable list so that for each works,

easiest way to figure that out is to use the Transformer. So basically if you test with transformer we want a list coming out in the test field, if that is not the case you would need to add transformer to manipulate until you have the desired output

JStephan_0-1746772857672.png

 

  • 197 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!