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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error while Patching t...
Power Apps
Unanswered

Error while Patching two SharePoint list in If condition

(0) ShareShare
ReportReport
Posted on by 130

I'm patching two SharePoint lists in else part of if condition but it returns an error : "Expecting one of the following Boolean ,Number ,Text,OptionSet Value."

My code is :
If(
isBlank(textinput.text),Notify("Field is required",Error),Patch(
SharePointList1,defaults(SharePointList1),{Name:textinput.text}
) && Patch(
SharePointList2,defaults(SharePointList2),{Name:textinput.text}
)
);

After first Patch function it does not even allow any Reset(),Navigate() or any other function.

I want to use validation for once only, otherwise to Patch second list I had to write these conditions again. 

Can anybody tell me what mistake I'm making?

Regards,
Rahul

Categories:
I have the same question (0)
  • Verified answer
    EdViegas Profile Picture
    436 on at
    Re: Error while Patching two SharePoint list in If condition

    Assuming that column "Name" is a text column, try

    If(
     IsBlank(textinput.text),
     Notify("Field is required", NotificationType.Error),
     Patch(
     SharePointList1,
     Defaults(SharePointList1),
     {Name:textinput.text}
     );
     Patch(
     SharePointList2,
     Defaults(SharePointList2),
     {Name:textinput.text}
     )
    );
  • r_voyager Profile Picture
    130 on at
    Re: Error while Patching two SharePoint list in If condition

    Thanks @EdViegas .

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 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard