Working With Flows: How Do I Access an Assigned Value Outside of a Repeat?

I have a Data Store with values like this:

attendees[1]
   first_name: "Fred"
   last_name: "Bloggs"
attendees[2]
   first_name: "Jane"
   last_name: "Smith"
attendees[3]
   first_name: "Mary"
   last_name: "Robertson"   
attendees[4]
   first_name: "Paul"
   last_name: "Peterson"   

I want to loop around these in a flow in order to create strings such as:

Jane Smith, Mary Robertson and Paul Peterson
Dear Fred, Jane, Mary and Paul...

(and other similarly non regular combinations)

Which I then assign to a variable outside of the flow.

I'm really unclear about how to do this!

My starting point is shown below... but the resulting variable description_booking_names ends up being null.

So another way of asking this is: In a flow, how can I use an assign within a repeat and access its value outside?

Can @George, @patrick or anyone else please tell me how I can do this?

Thanks!

Antony.

booking

The Global variables can be accessed outside of the repeat/flow. So maybe you want to use set global instead of assign.

2 Likes

It would seem that flows do not pass down the variables inside a repeat. I pretty much assume it’s to keep context separated which each promise has.

Have you tried with global variables?

2 Likes

bazooka-mosquito

Thanks folks. I’ll try global variables.

I just didn’t want to spend hours trying out different things if someone could just say “you do it like this”…!

I have one of those flies annoying me at the moment…

… now where did I last put my Bazooka? :thinking:

Last few times this happened you didn't look really happy "someone telling you how to build your app" :wink:

3 Likes

Yes, but that was about the entire methodology, not how to do a specific thing… :slight_smile:

1 Like