How do I make sure only one of my event blocks is executed not both simultaneously?

Hi there!

I have two event blocks, one is screen1.initialize, and other one is screen1.receivedShared. Both do the same job, i.e. displaying data from a file. Now, if the app is opened directly, the app will call file component and read data from a file. If the same file is shared to the app (without opening the app), the app will take data from the shared file.

I think when the shared file is received, it would also trigger the screen initialize block, as screen was initialized. I just want to make sure when the shared file’s event is triggered (after receiving file), the screen1.initialize block doesn’t trigger, so values don’t overlap or the app doesn’t misfunction (since they have the same task to do).

What should I do?

Edit : Here’s how the blocks look like currently :

Screen.Initialize will always be triggered first.


@vknow360 Yes, but the only time I don’t want it to trigger is when a shared file is received. What should I do?

Maybe wait a few seconds when Screen Initializes.