Loop not working as expected


I have tried to set up a loop block in my UI logic but I am not getting the result expected.

I am using onclick logic for a button on a form. First I set the list that I want to loop through:

This returns as expected:

I have then tried to set up the loop as is done on the instructional video:

The intended behaviour is that it will loop through the 5 items in the list, find the ones where the value mileageStarted is TRUE, create a new record in the PastYearTaxExpenses database and then set object relations for that record from objectIds of the employerName and yearEnding.

But it is not executing and the record is not being created.


I recommend adding print block so you can see what’s inside of your variables, in page data, and really anywhere where you logic touches data. Here’s one problem I see:
Loop not working as expected - UI Builder - Backendless Support 2021-12-16 13-32-14

1 Like

Thank you Mark, that has fixed it