Hello, I am having quite a bit of trouble figuring out why an Action behaves different when clicked by a user compared to when it is triggered by a workflow.
I programmed an action to add a new row to table “Análisis” with values from table “Producción” and when the user clicks it, the columns which I didn´t set a value for, use the expressions written in the Initial Value and everything works just as intended(I wrote these expressions in Initial Value instead of the formulas becuase later on in the App I need to set the values in those columns with other expressions). The problem is that I programmed a workflow which triggers the action, but when it is triggered the expressions in the columns which value is not set (I did not set these expressions directly in the action because these expressions depend on values from other columns in the table where the row is being added) do not give the same results (the correct ones) as if the action is just clicked by the user.
I know this explanation might be confusing, so i wrote the important parts of my App in a simplified version
Table “Análisis producción”
[Initial demand] …Initial value= IF(DAY([Date])=1, LOOKUP(…), [Last record].[Final demand])
[Final demand] … Initial value= [Initial demand]-[Production]
[Shifts left] … Initial value=IF(DAY([Date])=1, LOOKUP(…), [Last record].[Shifts left]-1)
For a record of table “Producción”
Add a new row to table “Análisis producción”
Set these columns:
When the user clicks the action, the expressions written in Initial value work correctly and columns [Initial demand], [Final demand] and [Shifts left] have the correct values. But when the action is triggered by the workflow, columns [Initial demand], [Final demand] and [Shifts left] values are incorrect.