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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / nest and iferror insid...
Power Apps
Unanswered

nest and iferror inside and if

(0) ShareShare
ReportReport
Posted on by 1,871 Season of Giving Solutions 2025

I'm trying to nest and iferror inside and if but getting error that IfError has some invalid argument ..

 

If(
condition,
IfError( ... ), <--- error here now
some other action
);

 

 

any advice?

Categories:
I have the same question (0)
  • realwillwright Profile Picture
    772 Moderator on at

    Hi @johnjohnPter 

     

    Can you be more specific with your error, the syntax for IfError should be

    IfError(Action to Check eg 1/0, result if error eg 0)

    see link for more details Error, IfError, IsError, and IsBlankOrError functions - Power Platform | Microsoft Learn

     



    -------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up. 

  • johnjohnPter Profile Picture
    1,871 Season of Giving Solutions 2025 on at

    @realwillwright thanks for the reply.. this formula which have IfError inside If condition is not working for me:-

     

     

     

    If(
     IsEmpty(colErrors),
     IfError(
     SubmitForm(PrintOrderForm),
     Notify(
     "Error when updating the submitting the Printing Order form",
     NotificationType.Error,
     10000
     ),
     ForAll(
     colRelatedPrintOrderDetails,
     If(
     IsBlank(ThisRecord.ID),
     Patch(
     'Printing Orders Details',
     Defaults('Printing Orders Details'),
     {
     'Network ID': ThisRecord.'Network ID',
     Quantity: ThisRecord.Quantity,
     'Quantity Each Artwork': ThisRecord.'Quantity Each Artwork',
     'Printing Order ID': LookUp(
     'Printing Processes Printing Orders',
     'Printing ID' = varPrintProcessID
     ).'Printing Order ID',
     'Printing Order Type': {Value: ThisRecord.'Printing Order Type'.Value}
     }
     ),
     Patch(
     'Printing Orders Details',
     LookUp(
     'Printing Orders Details',
     ID = ThisRecord.ID
     ),
     {
     'Network ID': ThisRecord.'Network ID',
     Quantity: ThisRecord.Quantity,
     'Quantity Each Artwork': ThisRecord.'Quantity Each Artwork',
     'Printing Order Type': {Value: "Scrolling"}
     }
     )
     )
     ),
     Notify(
     "Error when updating the submitting the Printing Order details form",
     NotificationType.Error,"10000"
     )
     ),
     Notify(
     Concat(
     colErrors,
     ThisRecord.Value
     )
     )
    )

     

     

  • realwillwright Profile Picture
    772 Moderator on at

    Hi 

     

    Can you try this?

     

    If(
     IsEmpty(colErrors),
     IfError(
     SubmitForm(PrintOrderForm),
     Notify(
     "Error when updating the submitting the Printing Order form",
     NotificationType.Error,
     10000
     ),
     ForAll(
     colRelatedPrintOrderDetails,
     If(
     IsBlank(ThisRecord.ID),
     Patch(
     [@'Printing Orders Details'],
     Defaults([@'Printing Orders Details']),
     {
     'Network ID': ThisRecord.'Network ID',
     Quantity: ThisRecord.Quantity,
     'Quantity Each Artwork': ThisRecord.'Quantity Each Artwork',
     'Printing Order ID': LookUp(
     'Printing Processes Printing Orders',
     'Printing ID' = varPrintProcessID
     ).'Printing Order ID',
     'Printing Order Type': {Value: ThisRecord.'Printing Order Type'.Value}
     }
     ),
     Patch(
     [@'Printing Orders Details'],
     LookUp(
     [@'Printing Orders Details'],
     ID = ThisRecord.ID
     ),
     {
     'Network ID': ThisRecord.'Network ID',
     Quantity: ThisRecord.Quantity,
     'Quantity Each Artwork': ThisRecord.'Quantity Each Artwork',
     'Printing Order Type': {Value: "Scrolling"}
     }
     )
     )
     ),
     Notify(
     "Error when updating the submitting the Printing Order details form",
     NotificationType.Error,"10000"
     )
     ),
     Notify(
     Concat(
     colErrors,
     ThisRecord.Value
     )
     )
    )
  • johnjohnPter Profile Picture
    1,871 Season of Giving Solutions 2025 on at

    @realwillwright  same error 😞 .. i think we can not currently nest IFError inside IF condition

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 936

#2
Valantis Profile Picture

Valantis 602

#3
11manish Profile Picture

11manish 598

Last 30 days Overall leaderboard