Edit key column

Not sure this was a thing…

So I’m trying to fix an issue with a bot using the Appsheet API. The API calls an action and the action creates a row in a table. Action type = set the values of some columns in this row.

The issue is I want to specifiy the key column within that action. But… you can’t. It seems once a key column is populated, it becomes Read Only, irrespective of any rules for that column. So if I add the key column to the action I get:

The column ‘ContactID’ of data action ‘TestAction3’ cannot be modified.

Any ideas

0 9 324
9 REPLIES 9

Yes, always.

I’m not clear what you’re trying to do. Why are you trying to edit the key value?


That’s the wrong Action type for creating a row.

Hi @Marc_Dillon yeah I know. But I was trying to diagnose the issue with this from yesterday:

and then today I read this:

which says:

You can only invoke the following types of actions from the API:

  • Data: set the value of a column

  • Grouped: execute a sequence of actions
    All actions invoked in the grouped sequence must be either Data: set the value of a column or Grouped: execute a sequence of actions .

My origional action was a “Add a new row to another table using data form this row” so I created a “set the values of some columns in this row” action to see if this was the culprit.

I’m very confused what your goal here is, sorry

If you still are having issues from the old thread, does it make more sense to continue posting there?

If you’re trying to add a new record via API, maybe just use Add via API, not invoke an Action?


Yah, that’s news to me, but it makes sense for the most part.
I’m curious though, this article was certainly written before some of the newer Actions were created, like “add a new row with values from this row”. Perhaps it was never updated. I would do tests to make sure you can’t use that Action.

I just tested this for you.

Action type “data: add a new row to another table” successfully executed via an API invoke an Action call.

Action type “execute an action on a set of records” does NOT work, returns error:

"Action of type 'REF_ACTION' for table 'parent' is not supported for the REST API."

@Steve, Could you update the doc linked above, to include the “Add a new row” Action type. Or, even better, find someone who knows more about this to properly/completely update this doc? Or I can submit a support ticket if that’s better.

Strange then that I’m not even seeing that error message

Sorry, the error wasn’t returned via API response, it was in the Audit Log.

3X_3_6_36a728072de60bfcf883fcdab66761eefe1203e3.png

Edit to the above.

The “execute” Action that I tried to invoke, was just simply to run the same “add a new row” Action from before it, on the same Table.

I made a new “grouped” Action, and just had it run the “execute” Action, and invoked it by the API, and it worked just fine.

i.e. API can’t run an “execute” Action, but it can run a “grouped” Action that in turn runs the “execute” Action.

So just wrapping it in a group action works?

Apparently.

Top Labels in this Space