I am using a compose action in a logic app in which I need to use a logical function that if xx condition passes then it can take the output from one compose action say compose1 and if failed then it can use from compose2 I tried to use the "if" logical function but it keeps saying that the expression is wrong. Ex what I have used ...
if(contains(outputs('Create_duplicateKey'),'SendVehicleOrder'),'outputs('Compose_Priority')','outputs('Compose_Category')')
I have also tried to directly use the outputs of compose1 and compose2 but it is still failing ...
if(contains(outputs('Create_duplicateKey'),'SendVehicleOrder'),'Id: @{items('Loop_through_all_alerts')?['ID']}','orderType: @{items('Loop_through_all_alerts')?['OrderType']}')
Is there anyway I can use these outputs in an expression
CodePudding user response:
After reproducing from my end, like @Skin mentioned removing quotes will make it work.
if(contains(outputs('Create_duplicateKey'),'SendVehicleOrder'),outputs('Compose_Priority'),outputs('Compose_Category'))
Alternatively, you can use condition action to achieve your requirement.