web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "IfError" substitute f...
Power Automate
Unanswered

"IfError" substitute for expression?

(0) ShareShare
ReportReport
Posted on by 818

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')

 

Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at

    I am not exactly sure I follow what you need. Do you just want to create a trigger condition that checks if a field in the SharePoint list is not null before the flow will run? If so, you can use this trigger condition:

    @not(equals(triggerOutputs()?['body/field'], null))

    Just be sure to replace field with the dynamic value from your SharePoint list.

  • WorkingRicardo Profile Picture
    818 on at

    Hello @David_MA ty for your message. No, not a trigger condition. I want to use an expression in an Update Sharepoint item action. The expression should be similar to this excel formula:

    IF.ERROR(LOOKUPV('ExcelTable1'!I29;'ExcelTable2'!A:C;3;False);C29)

    Basically saying, if there was no match found from Excel Table 2 from the searched element from ExcelTable 1, then don't create an error and just use C29 instead. My flow looks like this:

    Captura de pantalla 2024-06-10 090532.png

    Meaning, I'm filtering the Excel table to get the specific match that the user put as "Article 1" number. Then, update the Sharepoint list accordingly. I then use many dynamic content dependent to that Excel table. If no match found in the column of "items('Apply_to_each')?['List Price Gdf Italy']" (meaning, the Excel Table column that can be at times empty), triggerOutputs()?['body/Precio1'] should be used instead, for example.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard