Formulas don't work when columns have same name

So I have noticed that when using tables, if you have a column in two different tables with the same name, formulas don’t work well between the two.

My example: I wanted to have a row from one table copied to another using a button. I made a button with “add row” to the target table. I used column info from the row in the current table, but since the columns have the same name, the info was pulled from the target table and not from the current table to populate the columns.

If you set up two tables with identical column names, you will see my problem. Here, I have had to change the name of the columns in order for the info to populate properly.

image

2 Likes

I’ve also been experiencing this issue. I’d been collecting observations to submit later, but I’ll just include them here with your post:

When columns and tables have the same names, the auto-complete only presents the option of the column in the current table, rather than also presenting the option to choose a different table of the same name.

In general, the auto-complete seems to get confused often by COLUMN names, TABLE names, and CANVAS FORMULA names that:

  • are same text strings,

  • are different text strings, but have the same initial text string sequences, (abc123 & abc456)

  • contain hyphens in the strings,

  • contain underscores in the strings.

Hope this helps! :grinning:

1 Like

So I assume there is no way to override the autocomplete or specificy any other way to prevent this? Renaming my columns works for now but it seems like a pretty poor workaround.

@Leslie_Amador

When I’m not getting traction with code-complete, I manually enter brackets and then type inside the brackets, and that usually allows the code-complete to locate the desired object (~97% of the time).

When that doesn’t work, I rename the object (~3% of the time: usually exact name conflicts).

EDIT: Even when typing inside of brackets, the code-complete often will not present/grab the object until the object name string is fully typed out. (Dealing with this at the moment, actually.)

1 Like

@Leslie_Amador @Ander sorry for the confusion on this and thanks for the feedback. When you’re editing a formula in a table, the autocomplete automatically allows you to refer to other columns in that table without specifying the table. We call this being in the table “scope”. That’s why you can write a formula like [Column 1] + [Column 2] without having to specify thisTable.[Column 1] + thisTable.[Column 2].

A side-effect of this optimization is that if a table name and column name collide, autocomplete only gives you results from the local scope and omits the global result. You can work around this using our thisDocument keyword that allows you to explicitly refer to the global scope.

Example:

CloudApp

However (this is good timing) @Jason_Tamulonis just added a fix to this so that in the version rolling out next week this name-collision problem no longer occurs! Here’s how it looks in the new version:

CloudApp

Holiday Cheers
Alden

4 Likes