Collecting all dates into one table for a calendar

Hi there,

I’m relatively new to Glide apps - absolutely loving it. I’ve hit a blockage with my app however and would be grateful for some advice.

I have a number of tables with data users can submit about their homes. There are various columns within those tables that contain dates. What I’d really like to do is create a 'Calendar" page to display all those various dates. I’ve been able to do this using dates from just one of my tables, but how can I go about having a master calendar with dates from all the tables? I thought I could create a “Dates” table, but have no way of pulling in the various dates from elsewhere…

Many thanks in advance.

you can copy columns in Google Sheets ={A:A;B:B}
Glide does not have that option, you would have to join columns and split them… complicated but doable

1 Like

Thank you Uzo. Most of my existing tables are Glide tables and I believe, for scalability it’s best to keep that way. So unfortunately, even if I use a Gsheet for this consolidated set of dates, I don’t think I can use Gsheet formulae to pull data from Glide tables. Unless I’m mistaken.

You can check this out.

1 Like

Hello! Thank you for the link - it sounds like he/she has a very similar challenge… I’m actually stuck at the very first part of the proposed solution - “I would first bring my two date columns into the same table”. I suspect a very novice question, but how is it best to do that?

use the lookup column or join column, and point to the column with the dates

the tricky part is… you need to have the same or more rows in that table as all dates that you are bringing… so every time you add a new date somewhere, you need to add a row in this table.

OK yes, understood. I’m going to have a play with your solution as it looks like it could work :slight_smile: Assuming I can add a new row to my Dates table using the “on submit” feature. We’ll see.

Thanks very much - I’ll let you know how I get on…

1 Like

Just curious… why “a number” of tables and not just one table?
Sounds like it’s similar data, in which case it would probably make sense to have it all in one table.
Then you wouldn’t have the problem that you have now.

2 Likes

Nice Uzo, similar approach, same result.

Your approach: you handle values, then arrays.
Joined list Dates1. Joined list Dates 2. Template (join) Dates 1 & 2. Split (-> Array). Row index. Single value to create list of values from the array.

My approach: I work with arrays immediately.
Lookup Dates1 (-> Array). Lookup Dates2 (-> Array). Make array (join the array). Row index. Single value to create list of values from the array.

Any reason you handle values at the beginning and not arrays?

1 Like

in case you need to add some text, to make them unique when you have identical values… that would be needed to make rank… when you have identical values… row will be empty… but in this case, no need for it

2 Likes

I agree with Darren’s comment: if you are manipulating the same object (dates), are you sure they need to be in separate tables?

If really you need to pull in dates from different tables, I would do it as follows:

Dates3 in the Dates B table

Dates that need to be pulled into Dates A table.

Dates A table with Dates1, Dates2 and Dates3 as arrays

  • Dates1Array and Dates2Array columns: see here
  • Dates3Array column: do a lookup of /Dates B /Dates3.
  • Merging the Dates1Array, Dates2Array and Dates3Array columns stays the same.
  • Note: If Dates1, Dates 2 and Dates3 have a, b and c values respectively, then we will need a+b+c rows in our Dates A table to make this work. Uzo mentioned something to the effect of “every time you add a new date in one of the columns, you need to add a row in the table”.

My method handles arrays, I’m comfortable with it. Should you want to handle values instead (Uzo’s method), a few ideas:

  1. Either pull in arrays (with a lookup column as I suggested), then turn that array into a list with Single Value and RowIndex columns, then adapt Uzo’s method (joined list, template column).
  2. Or pull in values (not arrays) with Single Value and RowIndex columns. You’ll be able to point the Single Value column to any column in any table.
  3. Or pull in values using a single Relation on RowIndex columns followed by a lookup. This would be my least preferred approach, but it should work fine.
1 Like

Thank you all for the tips. To be clear on having multiple tables, I have tried, but the data is too different (I think) to suit having it all in the one table with additional columns. It would get very unwieldy that way.

I’m going to study the suggestions and see how I get on :muscle:

1 Like

Hey. To give an update here ultimately I realised that I wanted to have additional data alongside the dates to go in my calendar so i couldn;t get the suggested solutions to work (although may be missing something there).

I therefore decided to add an additional “add row” action upon editing or adding a new item to each of the product tables in my app. That way, every time a new item is added (or edited), a new row in my “calendar” Google table is created. I then used UNIQUE and SORTN in a second worksheet to identify the last update (so older entries are ignored). The calendar page then runs off this table. Probably not the slickest solution but it’s working for me now. Thanks for all your help/tips.

2 Likes