Passing Along An Empty Field (Using Actions)

I have an action that adds data to a new row from another table. It works great as long as all of the fields are filled in. The comment field is not required, but needs to be there just in case a comment is needed.

The fields are: status, name, date, and comment.

This basically logs the status and who changed it. Sometimes when they change the status, it needs a reason or maybe a location name etc. But sometimes it can be blank.

When it’s blank, it does not add a new row to my log table. Only when ALL FIELDS have been filled.

3X_a_c_acb870232638e7fa5d3eae4d64132a8227554c4d.png

I tried setting that column with an initial value of " " and TEXT(" ") and both do not help. If I add anything else like “(Optional)” or “_” or “.” it works, but then it’s passing over unnecessary text.

3X_9_2_92e2ecbfbc785b8f4fe42d17f0b67ae88491986d.png

I also tried an IF statement in the action: IF([fleet_comment] = “(Optional)”, " ", [fleet_comment])

I was hoping that would recognize optional should be a blank " " but it didn’t work. I just wish it passed along a blank comment, instead of me going through all this hassle.

Any help with this would be MUCH APPRECIATED.

Thank you!

Solved Solved
0 4 447
1 ACCEPTED SOLUTION

Thank you so much @Steve

I knew these audit logs existed, but I didn’t know it logged errors like that. This will help me so much!

For those wondering, I re-tried my workflow and then narrowed down the log search for today and selected workflows only. Then I clicked on the binoculars and it shows you the error.

3X_1_0_10da1c4f7e02662918055f9abd22d7ac555acb93.png

“Errors”: “Error: Perform DataAction ‘Fleet Status Change’ failed because Row having key ‘079d9a25-bf99-42dd-8a42-440c551d758d’ in table ‘FleetStatusHistory’ in field ‘comment’ is required to have a value. Error: ‘Add Row’ Data action ‘Fleet Status Change’ failed with exception Collection was modified; enumeration operation may not execute. .”,

This error made me look at the database which is not null, but the table itself in AppSheet had this column checkboxed as required. Once I removed that, it functioned as needed.

View solution in original post

4 REPLIES 4

My Action:

My Workflow:

What does the workflow log tell you?

Thank you so much @Steve

I knew these audit logs existed, but I didn’t know it logged errors like that. This will help me so much!

For those wondering, I re-tried my workflow and then narrowed down the log search for today and selected workflows only. Then I clicked on the binoculars and it shows you the error.

3X_1_0_10da1c4f7e02662918055f9abd22d7ac555acb93.png

“Errors”: “Error: Perform DataAction ‘Fleet Status Change’ failed because Row having key ‘079d9a25-bf99-42dd-8a42-440c551d758d’ in table ‘FleetStatusHistory’ in field ‘comment’ is required to have a value. Error: ‘Add Row’ Data action ‘Fleet Status Change’ failed with exception Collection was modified; enumeration operation may not execute. .”,

This error made me look at the database which is not null, but the table itself in AppSheet had this column checkboxed as required. Once I removed that, it functioned as needed.

Well done!

Top Labels in this Space