I get an enumeration error when trying to do an action on add from a workflow but when I click the action in a view it works fine? The action adds a row to a table.
Please post a screenshot of the error.
_RowNumber is your key?! Oh, Austinโฆ Yer killing me, man!
Itโd help to see the action configuration. Iโd guess youโre trying to set an Enum or EnumList column value to a value that isnโt a defined value and the column doesnโt allow other values.
Dont insult me like that
Hi @Austin_Lambeth
I dont see your key column in there?
I noticed that too. I guess my co-developer was in the app when I made that change but I tested it this morning with it in there for sure and it still errored the same.
So hereโs the thing Iโve noticed with Data: add a row to another table using values from this row: the Initial value expression for the key column value for the new row is evaluated before the columns set by the action are given their values, so the key columnโs Initial value expression does not have access to those new values. Would this affect your action?
Well it was originally using the initial value and it was not setting the key from the action. This action is being triggered by an ON ADD workflow. Would that make a difference too? Its referencing the added milestone through Milestone_ID. Is this a chicken and the egg? The milestone doesnโt exist before Iโm trying to set the reference to the milestone?
The enumeration error on rownumber is a very odd one. My Initial Value is MAX(Project_Details[Detail_Key])+RANDBETWEEN(1,500) so is it trying to grab a value based on itself?
Workflows run after the added/updated/deleted row has been added/updated/deleted.
Iโm completely confused by this.
So [milestone_ID]=[Milestone_ID]
I think your previous answer disproves this but I was wondering if the Milestone_ID was not valid because it didnโt exist yet.
The second part is me asking about the enumeration error cause its around the rownumber field which has no user control so its very weird that it is erroring.
My last statement confuses me too. Its early
@Steve
I think Reports could be having issues. I have actions that work perfectly when used from a view or called from a workflow but fail when run from a report. Note the similarities in error messages:
โErrorsโ: "Error: โExecute a Sequence of Actionsโ Grouped action โComboCopyDonorRequestsSetAddedโ child action โCopyDonorToRequestsโ failed due to error: Error: Perform DataAction โCopyDonorToRequestsโ failed because Row having key โ22b2f18eโ in table โRequestsโ in field โSTART_DATEโ is required to have a value. \nError: โAdd Rowโ Data action โCopyDonorToRequestsโ failed with exception Collection was modified; enumeration operation may not execute. .",
I have a post about it with screen shots of my actions.
For now my solution as is becoming more often than not is, avoid appsheets method and go to a database trigger
User | Count |
---|---|
17 | |
14 | |
8 | |
7 | |
4 |