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 / need help in Patch and...
Power Apps
Answered

need help in Patch and lookup functions

(0) ShareShare
ReportReport
Posted on by 291

Hi Folks,

 

Below is the formula, i am using but it is giving me delegation error for Email property, how can i implement this:

Patch(changepoint, LookUp(changepoint, ProjectStatus.Value = "Completed" && Customer.Email= User().Email), {columnA: true} )

 

Customer is multi person or group column in changepoint (sharepoint list)

 

Please help!

Categories:
  • GarethPrisk Profile Picture
    2,828 on at

    Add a Global variable for your app, in the App's OnStart.

    Set(gblUserEmail, User().Email);

    Their email won't ever change during the session, and if you include the User() (or other non-delgable) functions as part of a delegable function, you'll see that warning.

    Patch(changepoint, LookUp(changepoint, ProjectStatus.Value = "Completed" && Customer.Email= gblUserEmail), {columnA: true} )
  • IMathur Profile Picture
    291 on at

    Hi @GarethPrisk ,

     

    Please see the image below, 

    IMathur_0-1596972919244.png

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @IMathur ,

     

    There are a delegation error and incompatible type error on Customer.Email= User().Email part code, both error is because that the Customer column is Multi-selected person/group column. 

    The single-selected person/group column does support delegation when referring to the its Email, but Multi-selected person/group column doesn't support delegation.

    Another issue is that Customer.Email code returns a single-column table with all customers' Email, but User().Email only returns a Text, that causes the incompatible type error.

     

    The workaround:

    Set(gblUserEmail, User().Email);
    Set(varID, LookUp(AddColumns(changepoint,"NewColumn",Concat(Approver,Email)), ProjectStatus.Value = "Completed" && gblUserEmail in NewColumn).ID);
    Patch(changepoint,{ID:varID},{columnA: true})

    Hope this helps.

    Sik

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard