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 392
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