cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AshishJaiswal
Post Patron
Post Patron

Patch SharePoint list

Hello

 

I'm looking for a way to patch existing item in sharepoint.

 

But I'm not sure how to relate to the existing item or perform some kind of lookup to find existing item and update it.

27 REPLIES 27
RandyHayes
Super User
Super User

@AshishJaiswal 

If that is the case, then your LookUp is not matching a record based on the criteria.  It is very possible that User().Email is providing a letter cased value that is different than the one stored in the list.

Change this part of your formula:

   LookUp('List A1','Modified By'.Email = currentEmail),

To:

   LookUp('List A1', currentEmail in 'Modified By'.Email),

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes @Pstork1 

You are genius !!!
Without you guys, I would have never been able to achieve this.


It works- It is updating the existing entry 

 

But I get a warning


AshishJaiswal_0-1619025267159.png

 

RandyHayes
Super User
Super User

@AshishJaiswal 

Yes, I should have mentioned that you will get a delegation warning as the in operator is not delegable.

However, it was really more of a text to determine if, in fact, the letter case of the emails was the culprit.  Since it worked, then this is the issue.  

If you put a label on the screen and set the Text to : User().Email and then look at the email in the list for the Modified By column, you will see that there is a letter case difference.

 

Now, as for the delegation warning...if your list is less than 2000 records and not expected to exceed that, then you can ignore this warning completely.  If not, then we need to look at other alternatives.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
AshishJaiswal
Post Patron
Post Patron

@RandyHayes 

True 

In sharepoint column  I see name 

AshishJaiswal_0-1619026494038.png

But in Label I see

AshishJaiswal_1-1619026529537.png


My Sharepoint will have more than 5000+ items 😥😥😪

 

Please advise 

RandyHayes
Super User
Super User

@AshishJaiswal 

So then the real test from the SharePoint side would be to hover or click on the name in the column.  Then you will see the actual email address.  My guess is that it is still a different case.

 

You can also do this:

   LookUp('List A1', StartsWIth('Modified By'.Email, currentEmail),

 

It is not case sensitive and should solve it.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@RandyHayes 

Thank you, It works like a charm - If we ever met in the future - I will buy you beers all 7 days a week

AshishJaiswal
Post Patron
Post Patron

thanks

RandyHayes
Super User
Super User

@AshishJaiswal 

7 Day a week beer is my kind of thing...so we must meet up soon! 😁

Glad it all worked. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,854)