Google Calendar Bug fix: Now able to set Row ID in action

A long term bug is fixed now. It was about Google Calendar as a data source.

The problem was: We could select the [Row ID] in a LINKTOFORM() action but not in a “Add a new row to another table using values from this row” action.

The cool thing is: We can easily create Ref_Rows with that.

  • So if you have a customer and create a Google Calendar entrie from it, you can tell AppSheet to use this [Row ID]: [Customer's Key Column]&UNIQUEID()
  • Then in the Google Calendar you create a Virtual Column [Customer] with this expression: LEFT([Row ID],8) and the Type “Ref” to your table “Customers”
  • With that you will have a system generated navigation action in the Google Calendar’s Detail View that brings you to the Customer.
  • And you will have Ref_Rows in your Customers Table with all the Google Calendar entries for that Customer.

But we need to be careful with the [Row ID]. In the expression assistant we get this info:

New value for Google Calendar Event ID: Must be unique per row and contain only lowercase a-v and 0-9 (5-1024 characters). (Text)

This is a must for Google Calendar IDs.
So I think we can use UNIQUEID() ? I’ve never seen that it would create letters like w, x, y, z or uppercase.
Or maybe better: SUBSTITUTE(UNIQUEID(“UUID”), “-”, “”) ?
Does anyone have accurate knowledge about that?
Maybe @Steve ?

@lizlynch If you are still here, this could be added to the Release Notes.

5 Likes

UNIQUEID() should be safe, as it appears to only use lowercase hexadecimal digits (0 to 9, a to f), but since it isn’t documented, it technically could change without notice. I’d feel safe using UNIQUEID() here.

5 Likes

Here is the answer from AppSheet Support:

Yes, you can use UNIQUEID() directly. It meets Google Calendar’s requirements (5–1024 characters, lowercase a–v and 0–9 only) and is actually the built-in default Initial value for the Google Calendar Row ID column. (Note: If you just need a random unique ID and don’t need to set a custom/linked ID from the source row, you don’t even need to include Row ID in the action.)

If you prefer a 32-character UUID-based ID for extra collision resistance on high-volume calendars, please wrap it in LOWER() as well: LOWER(SUBSTITUTE(UNIQUEID(“UUID”), “-”, “”)) (This ensures any uppercase letters generated on client devices are converted to lowercase so Google Calendar accepts them.)

I asked them to add these information to the documentation.

4 Likes