Creating a schedule with If Then Else!

Hey all!
I would like to create different shifts. There are three columns:

  1. Now (Current TIme) using math pointing to Today’s time only.
  2. Start Time.
  3. End Time.

I actually need a submission form visible ONLY if Now (time) is on or after Start Time and if End time is on or before End time. I tried it using If Then Else as you can see but didn’t work! any ideas to figure it out?

Thank you in advance

Put those on a form button as visibility conditions.


If you still want the condition in the data editor, change your logic to check if Now is before Start Time, then return 0 or blank. OR, If Now is after End Time then return 0 or blank. ELSE return 1. The same logic would work in a visibility condition too.


That’s exactly what I want.

Thank You Jeff @Jeff_Hager

@kyleheney Thank you for your idea. I also tried it but I prefer If Then Else because I already created timers for admins and need it to be based on logic on Data Editor rather than visibility as I already set many visibility conditions. I added your both solutions to my note for future use. Thanks a lot


Hey @Jeff_Hager and @kyleheney, you might have a quick answer for this question:

kindly look at the highlighted row up there (named Nahid), assuming that she has been working like that for one week and received 500$. Now I want to change her start & end time.

Would it be possible to keep her previous start and end time while her salary keep rolling up? I’ve tried to change it manually and noticed all of her previous records changed therefore she got even more since her new shift is different and math calculation is based on End time - Start time.

I created a shift log sheet for users and their start and end times. Then I created a relation with user profile to look up their shift times. I’ve found out that glide picks the latest entry and since it is Email relation, it has changed all of her previous records.

In other words, how can I make it happen as a new entry without losing her previous history?

Hi… I think you’ll have to create a new row. Then, create a multiple relation that relates the user to themselves (it seems weird but works). Then, create a rollup that rolls up the math calc of that relation. This will give you the totals for each user, for every row they appear in.

Sounds good @shchc and I’ve done all of that such as self relation and create action to add a new row etc but the main part is this:

This week: their start and end time is different from last week. Therefore, if I change their start and end time now, it will change their entire previous history which I don’t want to happen. In fact I need the new schedule to be effective the moment I change it without changing previous one!

What kind of relations should I create? Even if they are too many it is fine!

I’m not sure I understand how adding a new row is affecting the previous rows. The easiest to add a new row is through a form submission. It sounds like you’re using an action to add rows now… how are you sending the schedule through the action? Is it a Single value? If so, I don’t think that’s the best approach if those values are going to possibly change in the future. You’d be better off submitting new start and end times for the rows through a form submission, in my opinion.


I got your point. That’s totally true. I made a mistake by creating shift log then created a relation with user profile to grab their start and end times. Using your method is good via form button but do you mean they must submit their start and end time every time they submit the form? If so, how can I change their start and end time then?

1 Like

If the start and end is part of the user profile, you should be able to grab and pass them through the form, without the user having to manually enter the values. This will still write it permanently to the form response sheet.

That’s something I still need to build in my app. I have lessons that the coach teaches, and each lesson type is charged a different rate. Right now I get the current rates through a relation, but I have the same problem if the rates change. It would affect all old lessons that have already been billed. I plan to change so the rate is permanently written to the form response sheet instead of determined through a relation. I haven’t worked out the details of how to do it, but that’s my plan.

1 Like

Since there isn’t a “time picker”, I create a choice component with times in 15 minute intervals. Users select a start and end time from choice components in a form.

If users have fairly consistent hours, they can set them in their profile and you can pass them to the form submission like @Jeff_Hager said. You could have a process for users to submit their “regular hours” and a separate process where users submit “different hours” when their hours aren’t the same as their profile hours.


You are both right @kyleheney @Jeff_Hager, Thank you so much for your brilliant ideas, the form button.

In fact I did the following and it worked with a little change. I created a form button pointed to Check in. Then I made two choices, one for start time and one for end time, both gather start and time from user profile since I already have their shift times over there. To prevent admins from playing around, I made both choices signed-in users and required. So every time they want to check in, they will see their shift which I have set already in user profile for them. They must click on start and end time to submit which in turn in check in tab in data editor it adds rows.

For you @Jeff_Hager I guess what I did might work for you too, hopefully. In fact I did create such an app before based on Subjects. Each subject has many lectures. Each lecture is given by a different teacher. Even furthermore, when students sign in for a lecture, it shows you on the app right away how many students have signed in so far. And if they really attend the lecture, upon admin approval, they earn golds.

1 Like