Change visibility date & time setting to "45 mins ago" (which is not an option on the Adalo menu)

I have a button that should only be visible if a customer has created an order “45 mins ago”… the date/time selector only offers 30mins and 1h. is there a way I can do it?

I assume it would be ((1/24)/60)*45 in UNIX time but that doesn’t let me do the “45 mins ago”

thank you

Hi @dilon_perera hope you’re doing well. I’ve looked in the forum but did not find a similar question, maybe you’ve seen this question before?

Hey @axme

Add a hidden input to the screen and a Number parameter called “Timestamp” to the user collection.

Save that timestamp as both a date/time and a number value.

Hidden input should have a custom formula to calculate the 45 minutes.

Custom formula: Timestamp + 0.03125

Then, use the number parameter to compare to the input’s value where “Logged-in user > timestamp # > is greater than > hidden input”.

1 Like

Hey @axme agreed on Mario’s answer above. You can also use this formula “(current time) + x/1440” where x is 45 mins. You can use this formula for any amount of mins given there are 1440 mins in a day.

1 Like

Thank you @Flawless and @Emeka, I forgot to explain an important detail:
I need the button to appear again after 45mins.

What happens now: I press the "order " button and create the “timestamp” → button becomes not visible as it should → but after 45 mins it does not show up again.
I’ve been trying many other combinations but I’m not getting the buttons to show up again.

Here’s a video of the setup (for testing purposes I made the button disappear for only 1 min):

Since I know this is costing you time, happy to buy your solution to this on nocodeshare/other platform :slight_smile:

Let’s make this happen easily. 2 date/time parameters (delete the number parameter)

1 Like

many thank you very much Sir @Flawless ! Brilliant solution

I didn’t add the hidden input: I just save in the user the date/time + 45mins and then show the button if “date/time + 45mins” is before “current time”. Am I leaving a vulnerability by doing that that the hidden input does?

Nope. You’re good.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.