Hello everyone,
there have already been some discussions on how to build an if condition that does nothing when false. However those Solutions do not seem to work for my case. Maybe you have some ideas to help me with this:
The request seems to be quite simple: If a certain colum(Actiontype) as a defined value do some calculations and put them into an other colum (Sum1). The Actiontype defines which sum colums (sum1-4) have to be updated. The sum colums already have some calculated values.
I am using the Dataverse Connector but anyways I though this should work: Solved: do nothing in if function - Power Platform Community (microsoft.com)
If eq(Actiontype),2, calculate and update sum1, do nothing
if(equals(triggerBody()['number']),2,variables('SummeEtat'))
if(equals(triggerBody()['number']),2,variables('SummeEtat'),)
if(equals(triggerBody()['number']),2,variables('SummeEtat'),'')
which either is not recognizes as a valid expression or promts this error:
Unable to process template language expressions in action 'Update_Controlling_Position_Etat_ANF_Prod' inputs at line '0' and column '0': 'The template language function 'equals' expects two parameters: the values to test for deep equality. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#equals for usage details.'.
I have tried puting the current value of the field into the false condition but since the current value comes from one apply to each container and the if condition is in another apply to each container I get another error that the first apply to each has to be superior to the second one which is understandable.
So maybe anyone has another idea on how to form an expression that updates a value if true and simply does nothing to the existing value if false.
Thank you in advance