Action Add a new row to another table problem

I’m trying to set an action, that auto adds a new row to Users table, when user add a new row to Companies table.
The error shown in log is:
Internal Error: Row not added because the ‘RowImage’ does not contain column number 3.:
What is ‘RowImage’ and why it should be 3? I don’t have such a column in any of my tables.
Any help is appriciated!

Please post a screenshot of the table’s column list from Data >> Columns in the app editor.

Hello, Steve. Just a small note here: I reconsidered the data structure, and I will delete the User Row ID column from this table, and will use User ID as a key. But I believe this is not related to the issue with action. (because User Row ID currently have initial value set to UNIQUEID())

1 Like

Maybe this?

image

image

2 Likes

Hello, Steve!
This was the problem - yes and no at the same time.
If the column have the initial value, then every new row of this column will always have the initial value by default. So, if the value is not provided by action, this column should get the initial value when a new row is added. But it didn’t work, so I tried to uncheck the REQUIRE, as you suggested. And it did work, a new row been added.
But then, after I saved changes, AppSheet automatically set the REQUIRE check mark to this column (since it’s the key). And then the action is working even with the REQUIRE checked.
I thought that maybe the issue was that the table was originally empty. But no. I clear all the records and tried again with REQUIRE checked. And it worked again! So, this issue, when the action can’t add a new row, happens only when the very first record being added to a new table.
Anyway, the problem is solved. Thank you!

1 Like

But there’s another issue. When I do this as another user (Preview App as), the new row is added wth my original (app creator) email, in the User EMail column. Although there’s a function USEREMAIL().
Is this because of the app editor, or because of USEREMAIL() function? If this is how it suppose to be, how can I properly test the app under different users account? Thank you!

1 Like

The Preview App as feature does not fully or reliably reproduce the app behavior with the alternate email address. When I need to test with an alternate email address, I open the app in an incognito browser window and login to the app with a different test email.

3 Likes

Thanks again!

1 Like