Customer to input a date to generate a list relative dates

Hello! I am really hoping someone can help me. I need to create an app where my customers can put in their wedding date and it will calculate important dates leading up to their wedding.
Ie:
Wedding Date 25/11/2021

  • Makeup & Hair trial (-2 Months from wedding date) 25/9/2021
  • First Facial Treatments (-8 Months from wedding date) 25/3/2021
    etc.

I was able to create a very basic one on GRID but i wasn’t super happy with the mobile experience. Wedding Calculator – Jessica Vegas Professional Makeup Artist

Thanks in advance!

Hey !

First of all, welcome on board the Glide Community ! If you need assistance, our friendly members will always do their best to help you ! (Help us help you :slight_smile:)

About your issue, I think that the following link can give you some valuable advice :arrow_down:

Can you confirm ? Hope this helps.
Once again, welcome !

1 Like

Thank you this has helped a little although I am still really confused on how to make the data interactive for the user.

Ideally there would be a date selector on the app where once putting in their wedding date, a list of suggested appointment dates would appear. Is that even possible?

What is the logic you want for the “suggested dates”?

1 Like

So I am trying to design a 12 month guide based on the wedding date.

EG.
Last facial waxing - 2 weeks before wedding date
Hair & Makeup trial - 2 months before wedding date
Last Hair Colour & Cut - 6 weeks before wedding date
Initial skin consultation with beauty therapist - 8 months before wedding date

So once the user inputs their wedding date, the other dates are automatically generated. Bonus points if there was a link they could click to “add to calendar” to link up with their icloud or google calendar.

Does that make sense?

So I am trying to design a 12 month guide based on the wedding date.

EG.
Last facial waxing - 2 weeks before wedding date
Hair & Makeup trial - 2 months before wedding date
Last Hair Colour & Cut - 6 weeks before wedding date
Initial skin consultation with beauty therapist - 8 months before wedding date

So once the user inputs their wedding date, the other dates are automatically generated. Bonus points if there was a link they could click to “add to calendar” to link up with their icloud or google calendar.

Does that make sense?

@Jeff_Hager would your trick here work with this?

"Calling @Jeff_Hager, calling @Jeff_Hager! :loudspeaker: :loudspeaker: Date Math assistance required in aisle 13!! :loudspeaker: :loudspeaker: "

@Jessica_Vegas this will be possible using the Glide Math Column. I’m sure our resident expert will show you how :slightly_smiling_face:

3 Likes

Thank you - I really hope I can get this to work as the one I created on Grid looks so dated and unprofessional. SNED HELP :frowning:

1 Like

So… subtracting any number of weeks from a given date is easy. When you subtract 1 from a date in Glide (using a Math Column), you get the previous day. So to subtract a week, it’s -7, etc.

That would look something like this:

And similarly…

Subtracting months is a little trickier. You can do a rough approximation by subtracting 30 or 31 days, which may be good enough for your purposes. There will be a way to get an exact number of months, but I’ll defer to our friend Jeff for that.

1 Like

Actually, a much better approximation would be to use 365/12 as one month (that’ll only be slightly off if a leap year is involved).

So this column would be:


And this one…

Putting all that together…

4 Likes

Hi Darren,

Thank you so much for this! It’s starting to come together. I am unsure, however, how to display this data in the app.

Once my user inputs their details (Wedding date, name, email, phone) i have a button that i would like them to click to reveal their unique dates (based on the wedding date inputted earlier)

I can’t seem to figure out how to show that. Any suggestions?

You can let them input the original date into a column in their user profiles. After that, all the calculations above have been done in the background.

Your button would use a “Link to screen” action, pointing to “This item” (you should use a screen pointing to the Profiles sheet, filter by email is signed-in user). In the next screen, you configure text/action text/rich text components to show the dates that have been calculated.

1 Like

There are many different ways that you can do this. The suggestion from @ThinhDinh is good if your users have already signed up and you want to permanently record these dates against their profile.

But if you just want something transient (like your current website), where people can “try before they buy”, you could do something like this:

First, in the data editor…

Next, in the UI…

  • Add a Date input component, and set the Data column for this to be the User Specific Column that you created above
  • Add a Rich Text component, and set the data source for this to be your template column. You can set the visibility condition on this so that it only appears when the user specific column is not empty.

What you should see then is that as soon as you select a wedding date, the other dates will automatically appear. And because you’ve used a user-specific column, every visitor (user) will see their own dates, without interference with each other.

Here’s a short video to demonstrate the effect:

That should give you something to get started with, feel free to ask if you need more help.

3 Likes

Thanks to you both - I am making progess!! Kind of…

Here’s what I have so far and I am happy with the appearance and the way it calculates the dates (i have to fix the formulas in the service columns)

However, i can;t figure out how to save the data for each person on a different line so they aren’t all getting each others dates. Does that make sense? even putting in other details, it still overwrites the first entry line rather than adding a new one.

![Screen Shot 2021-02-12 at 9.44.27 pm|552x500]

Assuming that you want to save the dates in your User Info sheet, with one row for each user…

  • You first need to create a column in your User Info table to store the wedding date
  • Next, you will also need the same math columns in this table to calculate the other dates
  • Then on the screen where you present the dates, add a button to “Save” them
  • That button should do a “Set Columns” action, setting the wedding date in your User Info sheet
  • Note that you need to use a filter on the screen “where email is signed-in user”. This will ensure that each users date gets stored in the correct row.
2 Likes

OK, where are we at on this. I heard my name. Deeper thinking takes a little more free time for me to sit down at a computer and try things out instead of hacking away on my phone.

Just quickly scanning through all the posts so far, regarding the date calculations, maybe you already have it figured out…but, largely, as @Darren_Murphy pointed out, if all depends on your definition of a month. Is it a calculation based on a number of days (such as approximately 30 days) or is it based on finding the the same exact day number, but in a different month. For example 2 months prior to today could be represented 60 days ago (Dec. 15th 2020) or 2 months ago (Dec. 13th 2020). I’m guessing based on your situation, you’re more concerned with the actual number of days, so it can be loosely based on the number of days, which I think was covered above.

To save the dates, what I would do is enable user profiles and row owners on that sheet. Then place all of the dates and calculations in that user profile sheet. When they sign in, it will create a new row automatically. Then they can enter their wedding date and everything will be calculated and unique to only them. Row Owners ensures that they only have access to only their own data. Otherwise you could filter each row by signed in user.

Like @Darren_Murphy said, there’s a lot of ways to approach it and it all depends on how you want the app to flow. Other options are a form where they simply enter a date, but it won’t calculate in real time. Once they submit the form, then you can display their row of data and the form sheet would have all of the calculations. They could then edit the date later if they chose. The only downside is there are a lot of extra clicks and you don’t always have real time calculations, unless you have entry components on the details screen.

Also want to mention that I’d be careful with the swipe layout if you aren’t using it for it’s intended purpose of swiping. I recall another post where someone had issues with things not working right because they were using the swipe layout.

5 Likes

@Darren_Murphy @Jeff_Hager @ThinhDinh @Aymen
YOU GUYS ARE AMAZING!!! My app is now live. I am so happy with it!

I would love your feedback on how it functions. I would also love any help to be able to do a simple welcome page with an image and a little bit of text when they sign in. That part I couldn’t figure out.

But i honestly can’t thank you enough!!!

5 Likes

Hey @Jessica_Vegas !

Happy to hear that your app is now ready :medal_sports: Congrats !

I recommend you to keep your app public and require the user to login when he/she has to enter the wedding date (or whatever…), this will let the “random users” to try the app and familiarise themselves with it before having to sign-in.

Trust me when I say that a hugeee amount of people will simply leave the app if the first page they see is “please sign-in”. That’s my little advice :slight_smile:

2 Likes