'Time limit' profile

Up2 everyone, Hay quick question, can you put a time limit on a profile?
Meaning id like to set a 24 hour time limit for a profile to show up in a current city.
At the moment i have a go live button In my data set to yes/no. No being the default. Once the user clicks go live it shows up in my repeating group as it should but I need it to undo it self after 24hours by default so they will no longer show up in that city until go live is clicked again.
Any help would be great
Cheers people

@b.goldsworthy01 — you want to change the “go live” to “no” after 24 hours. Correct?

If so, you could schedule an API to change the field back to “no” after 24 hours.

You would need to create a “backend workflow” API endpoint that changes the field back to “no”.

Then on the frontend workflow when the person goes “live”, (i.e, gets set to “yes”), the next step would then be to “schedule the workflow” (selecting the one you built above) for “current date and time +days 1”

Note: Keep in mind that you’re changing the data and there’s no way to keep a log if you do it this way. An alternative format would be to create a new data type “Live” with a field for the city and user type. You could then set it up to be considered “live” only if there is data entry created for this user in this city in the last 24 hours.

Lmk if this doesn’t make sense.

1 Like

Ok I have achieved your first method, it works Perfect. The profile disappears as soon as time expires you don’t even have to refresh the page to see the effect take place.
Is there away to have the profile remain until a page refresh?? after the time expires?? if not that’s ok it won’t affect the web app to much BUT it would be good so things don’t disappear in front of the users eyes if they are still viewing it
Cheers maryfox20

I appreciate your help

1 Like

Sorry just seeing this. So you’re saying even if the 24-hours has expired, keep the page current if they haven’t left it?

I’m not entirely sure what you’re trying to accomplish, but if it’s for other people, i’m not sure you can require them to refresh as data is updated in real time. But if it’s just what this one user sees, you might try using a condition that happens only when a page loads.

For example, when the page loads and they’re currently still set to “yes”, then show the profile. In this way, they’d see the same information until they refresh.

If you’re not familiar with custom states, check out this link: https://manual.bubble.io/working-with-data/element-custom-states

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.