Use variable in Evaluate

My question:
I’m trying to automate some data collection from a source that stores vital data in a “heading” structure. Essentially this:

{ client: A
contracts: [ contract 1, contract 2] }
{ client: B
contracts: [ contract 3, contract 4] }

The report I’m feeding into takes data in the form:

| A | contract 1 |
| A | contract 2 |
| B | contract 3 |
| B | contract 4 |

Here’s the thing. To get the list of contracts I have to make a request using the client’s identifier. I’d like to save the client id, iterate through the contract information then make the next request.

I’ve already tried:
On success of the getContracts, set client identifier as a variable. Feed the variable into an Evaluate block, selecting each contract in the contract list.

The evaluate block seems to expect the same number of inputs or else it stops calculating until I can send the ID again.

Using the repeat block I can’t get it to send identifier B after it’s done with A.

What am I missing?

I figured it out.

I pulled the full contract list and the client identifier into an evaluate box. Using map I created an array of objects where the clientId field was always the identifier I passed through.

I had to pull everything through another for loop to append the two lists I created but you can see the result is exactly what I was looking for.