Accessing Pack Object Properties with Dot Notation?

The data types page in the pack documentation includes this bit:

Like Coda tables, the fields within an object can be accessed using dot notation.

However, I’ve never seen this work in practice. Even in high usage packs like the Google Calendar pack, there’s just no way to use dot notation to retrieve a property of an event object returned by the Event() formula.

Example: a table has two columns, Event and Title. The column type of Event is the custom event column type provided by the Google Calendar pack. The column type of Title is text.

When writing a formula for the Title column, Coda will correctly suggest and autofill all the different properties of the event, like ‘summary’ or ‘description.’ However, the output is always blank. A formula like this one does not find any value:

thisRow.Event.Summary

Here is a sample doc containing this example (make sure to copy it if you want to try any edits to the formula).

I’d like to make clear that this isn’t an issue with the Google Calendar pack in particular; it’s an issue with 100% of the packs I’ve seen that have a formula that returns an object. If anyone knows of a pack that returns an object that allows properties to be accessed through dot notation, that’d be helpful!

1 Like

Hi @Joel_Tennyson1 - Sorry for the slow reply, I was traveling up until yesterday. The short answer is that the problem you are seeing stems from using both a formula and a column format on the same column. If you change the Event column to be of type “Text” the dot notation will work perfectly.

The issue here is that column format is really just a way of accepting text from the user, running it through a formula, and outputting the result in the same cell. When you use a formula to fetch an event, and then pass that event through the column format, you are essentially running the formula twice, which leads to some weird results.