Set Variable

Hello, how can I output the highlighted result using a Set Variable module?
Thank you in advance for your help!

1 Like

Do you want to have the value of the first child of the array only?

Only of the Contact attribute value, in this case " Angebot erstellt"

is it always one value in the Array? as i can tell, the contact attribute value is an array, so it may contain multiple values.

yes, always one value

Alright, this may not be the answer you’re looking for—I’m just trying to brainstorm the situation with you. :slightly_smiling_face:
At the top, you have several bundles (Bundle 1). Each bundle has (I assume) one Array. Each of those Arrays has one collection. Each collection contains a contact collection that holds the contact attributes array. This array contains several collections, and each of those holds an array (the contact attribute values).

More visual structure:

  • Top of the bundle (pos. 0)
  • Bundle (pos. 1)
    • Array (pos. 2)
      • Collection (contact) (pos. 3)
        • Array (contact attributes) (pos. 4)
          • Collection (pos. 5)
            • Array (contact attribute values) (pos. 6)

Now, what I would do in this case is have an iterator running on top of the bundle (pos. 0), followed by another iterator on the contact attributes (pos. 4).


How does this work?

Depending on your case, the top of the bundle may contain several bundles, so you may need to go through all of them. (If not, you can skip the first iterator.)
Since the Bundle (pos. 1) is a collection that contains an Array (where your target data is), you don’t need to iterate over the bundle itself—we know exactly where the data is.

Going one level down to the Array (pos. 2):
In your case, each array (I assume) has only one item, so we don’t need to iterate—it’s safe to move forward and select the first item directly.

Going down to the contact collection (pos. 3):
Since we only need the contact attributes, we can skip iteration here as well.

Going to the contact attributes array (pos. 4):
This array contains multiple collections. Each of these collections contains (I assume) a contact attribute value that holds the actual data we want. So, we need to iterate this level to extract all the contact attribute values.


Lange Rede, kurzer Sinn – What needs to be done?

You need to:

  1. Depending on your case, iterate through the array of bundles (pos. 0)
  2. Iterate through the contact attributes (pos. 4)
  3. Capture (set variable or whatever you need) the data

I’ve created a similar scenario with input data like yours (copied from your screenshot). Here’s how it looks:

I have created a similer scenario with similer input data as yours (copied from your screenshot).
Here how it looks like:





Be Caution:
If you Iterate and try to write to a variable, it will replace the old value on each run. So writing to variable is not the best thing you can do.

If your first module is an instant module that is set to run immediately, then you do not need to aggregate into an array.

Could you provide a screenshot of your scenario?