Date in user profile

Hi. I am trying to find a date that is available when opening a form, not only after submit. The only place is in the user profile, but since the date is calculated it is not available as a field on the form. The date is a few days into the future and is the same for all users opening that form (via a button.) I don not want the users to pick a date since it may lead to errors - it must be that specific calculated date. In AI there is a Text-to-Date function but not the reverse.
Is there ANY way to create a field in the profile that will make the calculate date a text value?

1 Like

Hi @Paarl_Bus :slight_smile:

From what I understand, you’d like to store a date (and time?) when a User hits a button that opens a form right?
And then, you want to add a few days to this stored date, probably to use this calculated date as a reminder or to rigger something?

A possible approach

For storing the date and time of form opening, have you though to create a workflow for this? A basic one, with two steps:

  • Set columns values
  • Show form screen


For adding days (or anything) to the stored value, what about creating a Math column like this:

Variations can be implemented by changing the formula.
As 1 is regarded as 1 day, if you want 1 hour, just divide 1 by 24:


Does that work for you? :thinking:

2 Likes

Hi @Nicolas_Joseph, thank you so much, It worked perfectly. It has helped me understand better how Glide works.
For interest’s sake, I had to calculate the dates for the school runs, normally the upcoming Friday and Sunday. But after that this Friday’s date must be compared to the current school term Start date to check it falls within the term; and Sunday’s date against the term end date. That is working fine: the workflow sets a profile column to the current date , a calc column gets the month of the date that was set in the workflow, a relation finds that month in an array column in TermDates table, and Lookups find the start and end dates. A DateDiff column counts the days between the workflow date and the term start date, and the TripStart column calculated the date for term start date -1, which will be the day of going back to school at term start.

These values are then used in calculating the actual dates: first Fri (now+6-weekday(now)) and for Sunday add 2 days. Then an IF-ELSE column check if the DateDiff value is 1; if it is, use the value of TripStart, else use the Sunday date. So that’s term start dates sorted. (BTW, Friday’s date is the 1st Friday of the term, therefore AFTER the Sunday date while normally it is 2 days later. Since it is in any case the correct date for the NEXT trip, I just hide it on the Booking form.)

Next up will be checking date home against term end date, and checking both dates against the Public Holidays dates. But there is time for that and I understand now exactly what to do.

All that effort just to make it easier for users to do the bookings and prevent errors! :sweat_smile:

Shoutout to @ThinhDinh and @Mazen also for putting me on the right track. Many thanks!

2 Likes

:clap: :confetti_ball: Glad to hear that! And you’re very welcome.

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