Hi All, I am new to power automate.
I built a flow that basically does this:
On form submission, it grabs certain selected fields and writes to a different excel file table. That part worked fine. I needed to add a feature where it needs to evaluate certain form fields for certain values and needs to write certain output values based on the conditions. I built a function expression, which does not give me an error when I check my flow, but the flow fails with the error upon running:
"Unable to process template language expressions in action 'Add_a_row_into_a_table' inputs at line '1' and column '15822': 'The template language function 'item' must not have any parameters.'"
I exported and imported the flow, and I am pretty sure that is not the issue -since the flow works fine without the function. Its probably with the syntax of that function statement.
Here is the function statement:
if(or(equals(item(outputs('Get_response_details')?['body/rfabd17289f3b4dc9bae285dc5fcc1886']),'ENGL 121'), equals(item(outputs('Get_response_details')?['body/rb70aba84d6a24043921ca96a2f9d74cb']),'ENGL 121')),'6',if(or(equals(item(outputs('Get_response_details')?['body/r686b527f20aa4dacb1f3cc0d901d77e4']),'ENGL 099/121'),equals(item(outputs('Get_response_details')?['body/rfabd17289f3b4dc9bae285dc5fcc1886']),'ENGL 099/121'),'5',if(equals(item(outputs('Get_response_details')?['body/r686b527f20aa4dacb1f3cc0d901d77e4']),'ENGL 095'),'4','5'))))
which should be equivalent to excel logic:
IF(OR(equals(AH2, "ENGL 121"), equals(AJ2, "ENGL 121")),6,IF(OR(equals(AF2, "ENGL 099/121"),equals(AH2, "ENGL 099/121"),5,IF(equals(AF2, "ENGL 095"),4,'5'))))
which is basically,
if
AH2 = ENGL 121 or AJ2 = ENGL 121
output 6
else if
AF2 = ENGL 099/121 or AH2 = ENGL 099/121
output 5
else if
af2 = ENGL 095
output 4
else
output 5
I can't figure out where is the issue in my FX statement that it is throwing this error. Any help is appreciated!!