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 Apps / nest and iferror insid...
Power Apps
Unanswered

nest and iferror inside and if

(0) ShareShare
ReportReport
Posted on by 1,811 Super User 2024 Season 1

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,811 Super User 2024 Season 1 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,811 Super User 2024 Season 1 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard