App crashes when I use certain screen

Hi! Everytime I test out this specific screen my app crashes, does anyone know why? This is all my code in the said screen.

blocks (40)





You should set teamName in the Initialize event and not during initialization of the global variable

To test this you should start in Screen1 and switch screen to have a value in teamName

Taifun

Hi it still crashes when I go to the certain screen. This is the code blocks I improved

Does that certain screen have the required spreadsheet error event block to report what error happened?

No I will add one and see what happens

I added spreadsheet error block and these are all current blocks at the moment:







blocks (52)

and this is the spreadsheet (accessible to anyone with link as well as attached form)

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

remove this, and see what's on label2.

2 Likes

the .aia:
HomeBase_copy.aia (305.7 KB)

Also, provide the link.

We have no way to see all the sheet names without direct browser read access to the sheet(s).

This is wrong.

Read the tool tips for the event block and the remove row block.

One block gives you a list, and the other wants a single item, not a list.

I found this block that opens screen roster without a start value.

You have to check the start value when you enter (or return to) each screen to see if it is blank before you start using it to filter anything.

1 Like

Instead of passing values between screens (you can actually consider each screen as a separate App because they practically are), Think about changing to use Virtual Screens instead.

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens.

So, instead of separate "houses", virtual screens are "rooms" of the same "house".

This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.