Can this be done with Glide?

I’m building a unique “ticketing system”, so far I’ve manged to link a QR to an edit record in Glide which displays the ticket info and when submit is pressed, it increments a number already saved in a field from previous form submission - great! I need to go a bit deeper however, so now I need 3 fields named:

  • Morning
  • Day
  • Evening

Each field holds a value, say 10 in each. When the submit button is pressed, I need to increment the number in the field based on the time of day. So for example, if it is between 7am and 10am, the number in the “Morning” field is incremented.

Can this be done in Glide? Can I auto populate a field with the current time using some kind of “utcNOW()” function?

Also, is there a way to password protect pages within an app?

Yes, that can be done.

Something like this:

  • Start with a Math column: Hour(Now), where Now is the special now datetime value. This will return a number representing the hour of the day.
  • Create an if-then-else column, something like so:
    – If Hour is greater than 17, then “Evening”
    – If Hour is greater than 12, then “Day”
    – Else “Morning”
    – (obviously adjust the numbers above as necessary)
  • Now you can add 3 conditional branches to your Button Action:
    – If “Morning”, then increment Morning column
    – If “Day”, then increment Day column
    – If “Evening”, then increment Evening column

You could skip the if-then-else column if you wanted to, and use the Hour of Day result in your conditional action. Personally, I’d use the extra column as it makes it a little less abstract. But that’s up to you.


Perfect - thanks Darren!

I see if I can find a list of function for Glide!

@Darren_Murphy - is there any way to trigger an action when a page is viewed given we can’t send webhooks to Glide?

It depends how the user is navigating to the page.
If they are getting there as a result of an action (eg. Show Detail Screen, or a Button Click) then sure, you can make that a custom action and include as many steps as you want.

But if they’re clicking on a top-level tab, then no, it’s not possible.

They’ll be coming to the page via a deeplink attached to a QR code so sounds like this is a no?

Would be good if the incrementation could be do automatically based on when the QR code is scanned. Shame the barcode scanner doesn’t work with QR codes.

I could of course use Make to build this out with a webhook but that adds more cost unfortunately :frowning:

That being said, pressing a button on the page isn’t too much of a problem and lets the user have a little more control I suppose!


1 Like

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