App crashes when I try to remove an item from a LIST

Hi all,

I am trying to loop with actions using the solution in the video below and it works like a charm.

I am trying to adapt it but it freezes when I click Save.

He is using products, I am using dates.

Matt’s Parent Table
VC: [Created Children]
VC: [Remaining to be created] = [EnumList]-[Created Children]

My Parent Table (no VC)
[Last child created]
[Remaining to be created] = [EnumList] - LIST([Last child created])

The flow should be the same but I have better control over [Remaining to be created] and I need this later for a re-loop.

1’st try to get the Date of the last Child created:

VC column in parent table with MAXROW(Child,_RowNumber)
VC column in parent table ref to child table and get the last Date.

The app editor saved fine but when saving the form, the app crashes.

2’nd try
Action on the parent table to set the [Last Date Created] just after the child is created.
Action to update [Remaining] = [EnumList]-LIST([Last Date Created])

Crashed again.

The first try was messy but the second one I think it’s fairly clean.
I was sure it will work.

I have checked everything and it only crashes when I do this:
[Remaining] = [EnumList]-LIST([Last Date Created])

Is this a bug?

Thank you!

@MultiTech_Visions

Hi again,

Found the issue.

It was a mistake on my side.

The correct formula to update [Remaining Dates] by removing the last created date is

[Remaining Dates]=[Remaining Dates]-LIST(INDEX([Remaining Dates],1)

Instead of

[Remaining Dates]=[EnumList]-LIST(INDEX([Remaining Dates],1)

Quite obvious now but somehow took me hours to see it.

I think the crash was happening because [EnumList] never changes and I don’t have a condition to prevent duplicates yet, which would send the app in an infinite loop but the app editor didn’t pick it up.

4 Likes