Mit app inventor crash(close directly) when i click the save button

Hi, Im creating an app that can save guardian information but when i click the save button mit app close directly. I use two vertical arrangement to do it (GuardianListView and GuardianForm). Anyone have an idea to fix it. Thank you very much.

Are you using android or iOS companion ?

Your procedure that creates a new guardian increments the global guardian id AFTER you fill in the new guardian attributes. That causes your first guardian to have an id = 0.

But you are using 0 as the NOT FOUND return for no guardian.

That is asking for trouble, since AI2 indexes lists starting at 1, not 0.

Regardless, please show the exact error message you got.

i use android

The companion close directly. no error message shown