Can't update body variable of request in for loop

Problem
I’ve several requests which collect information or send information. I include this flow with 2 loops. 1 of them is with a “Repeater” and the other, directly from a “For” loop.

Once I run the “For” loop with the request, it’s turning into an endless loop once I connected a variable or for loop body.

I think because the “Fail” return of the requests isn’t handled correctly, I tried to collect the “Fail” response, but that didn’t solve the issue.

The problem I think is, I can’t connect a variable to a body variable of a request, it doesn’t failed when it’s a uri variable.

Tried
I already implemented a way of mapping the course id with the student, but because the student uuid is based inside the body of the request it doesn’t work, once I removed the variable out of the body it works, but I need the uuid.

Acceptance
I want to fix this “For” loop and understand what I did wrong…

Path

  1. Creating and collecting students.
  2. Assign students with a “For” loop on a course.

Flow overview
You can find the loop at 7th purple block.

Legenda

  • On the left with the white blocks, there you can find the display blocks and define blocks, where you can setup how many students you want to create.
  • The blue boolean blocks are telling which requests has finished correctly
  • The purple blocks are requests
  • All yellow blocks are calculations/statements, like: evaluate if the requests http code is something. For loop collectors and activators, because you can active every request individual if you want to define your own flow path.

Hi @nibhvdigitalimpact

Welcome to the forums!

A couple things here:

  1. Regarding your loop, instead of using the for/collect blocks, you can transform the data directly in the evaluate block by selecting just the students elements of your first list. I’m just guessing at the structure of your data returned based on the types in the screenshot. If this doesn’t work for you, if you’re able to provide an example response, it would help me point you in the right direction.

  2. I can’t connect a variable to a body variable of a request, it doesn’t failed when it’s a uri variable

Could you explain this a little more or show me a screenshot of what you mean?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.