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 / Error while Patching t...
Power Apps
Answered

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

    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

    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

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard