So I have a flow connected to an Excel file and Sharepoint list. Trigger is when item is created. The point of it if its finds an Excel match in a number provided in Sharepoint, it posts then the data from Excel to Sharepoint. The Excel file has rows such as price, item name, discount, etc.
It's on 5% of cases, but there are two things that can cause an error here:
- No number is found in the Excel table, as this item hasn't been created yet.
- The number was found, but there is no match in one of the columns that are to be posted in Sharepoint (Eg: price)
So... In the Excel file is a straight-forward formula:
IF.ERROR(LOOKUPV('ExcelTable1'!I29;'ExcelTable2'!A:C;3;False);C29)
Basically saying, if there is an error searching for the data in the Excel Table, just use the base C29. In my case, it would be "triggerOutputs()?['body/Precio1']"
Is there a way to replicate this with a Power Automate Expression? I asked ChatGPT and apparently the coalesce function will work... But will it?
coalesce(triggerOutputs()?['body/PropertyThatMightNotExist'], 'DefaultValue')