How should I trigger a particular block only the very first time the screen is opened?

Hello,
I have a Pay Screen in my app.
What I want to do is, I want to open Chrome with my payment link(only when the very first time the app is opened) & the second time (when the user presses back from Chrome and comes back to my app),
I want the label to go : Succesfull Transaction! and after 2 sec., open my Menu screen.
How can I achieve this?

Thanks,
Kartik

9 Likes

You have the “when Screen1 starts” event that could be used for this. And if you are unsure that it may be a one time only thing, it could check for a value that it sets in a permanent record, like the Local Storage.
If the value is there (let’s say, for argument sake, that you call it ‘seen_already’) and that its value is TRUE, then you skip triggering the block. Otherwise, you trigger that block and make ‘seen_already’ to TRUE.

1 Like

Thanks for Reply, @CBVG…

Your Idea seems right to me…Could you provide Sample blocks as well (if possible, i don’t want to bother you…) It would be helpful for me :smile:

Thanks :grinning:

9 Likes

No. I do not have anything of that sort right now, I would have to program them from scratch, which would take as much time for me as it would for you.
And that is particularly true since I am still on Classic owing to X not having the canvas and webview string that I need.

2 Likes

Thanks :smile:
I am closing the topic now.

Thanks again!

9 Likes