Hello, I am trying to compose a piece of text that changes depending on the input value.
My flow can return one of 7 different inputs and I would then like to output a different piece of text depending on which of the 7 inputs have been generated.
I have created an expression that works in excel:
=IF(A3=13571,"Projects",IF(A3=13570,"Reliability",IF(A3=13569,"Cost Down",IF(A3=13568,"Certification",IF(A3=14657,"EOL",IF(A3=16656,"Support",IF(A3=13737,"Supplier Change")))))))
But when I try transfer it into an expression in automate, it will not accept it:
IF(outputs('Compose_-_Inititive')=13571,"Projects",IF(outputs('Compose_-_Inititive')=13570,"Reliability",IF(outputs('Compose_-_Inititive')=13569,"Cost Down",IF(outputs('Compose_-_Inititive')=13568,"Certification",IF(outputs('Compose_-_Inititive')=14657,"EOL",IF(outputs('Compose_-_Inititive')=16656,"Support",IF(outputs('Compose_-_Inititive')=13737,"Supplier Change")))))))
I have found a work around, which is to string a load of true / false controls together but I cant help but feel that there should be more elegant way of doing this.
Any help would be much appreciated.
Sorry! I have found my mistake!
This has now worked:
IF(equals(outputs('Compose_-_Inititive'),13571),'Projects',
IF(equals(outputs('Compose_-_Inititive'),13570),'Reliability',
IF(equals(outputs('Compose_-_Inititive'),13569),'Cost Down',
IF(equals(outputs('Compose_-_Inititive'),13568),'Certification',
IF(equals(outputs('Compose_-_Inititive'),14657),'EOL',
IF(equals(outputs('Compose_-_Inititive'),16656),'Support',
IF(equals(outputs('Compose_-_Inititive'),13737),'Supplier Change','Other')))))))
Thanks again abm!
Thank you very much for your response abm,
I have updated my expression to the this which the expression tool will now accept:
IF(equals(outputs('Compose_-_Inititive'),'13571'),'Projects',
IF(equals(outputs('Compose_-_Inititive'),'13570'),'Reliability',
IF(equals(outputs('Compose_-_Inititive'),'13569'),'Cost Down',
IF(equals(outputs('Compose_-_Inititive'),'13568'),'Certification',
IF(equals(outputs('Compose_-_Inititive'),'14657'),'EOL',
IF(equals(outputs('Compose_-_Inititive'),'16656'),'Support',
IF(equals(outputs('Compose_-_Inititive'),'13737'),'Supplier Change','Other')))))))
But something is still not quite right. The compose is seeing the input as "Other". I'm not sure what I've done wrong.
Hi @Roberto86
In PowerAutomate IF expression to compare equal is something like this.
if(equals(50,100),'Equals','Not Equals')
Thanks
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1