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 / Patching an email addr...
Power Apps
Unanswered

Patching an email address into a sharepoint list, criteria is set by and ID field - then should update all fields that match the ID.

(0) ShareShare
ReportReport
Posted on by 118

So I'm trying to accomplish a couple of things.

  First:

A. I have a text input box on a (Thank You) screen and a user would type in their email address and click a button to patch it to the sharepoint list.

1)Criteria for where to record is that an input box on the 2 screen (Lookup Info Screen) matches an ID number in the SP list.

What I have for a button to patch this info to a SP List:

 

DisplayMode = If(Not(IsMatch('TxtInput-StEmailAddress'.Text, Match.Email)), DisplayMode.Disabled, DisplayMode.Edit)

 

OnSelect = Patch('ThankYouCardList-Student-Donor', LookUp('ThankYouCardList-Student-Donor', Student_ID = sbox - ID),{TxtInput-StEmailAddress: {TxtInput-St_Email'})

 

Jeffrey_H_2-1689618596811.png

 

part of the Sharepoint list"

  as you can see there can be multiple records this email address needs to be patched into.

Jeffrey_H_3-1689618701202.png

 

This is the screen that the "ID" gets checked against the SP list.

   The Type ID here input box is then verified with an existing record in the SP list.  I call this input text box "sbox - ID"

Jeffrey_H_0-1689618907312.png

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @Jeffrey_H ,

    I am assuming some control names here, and the field names are based on your image, but it should be something like

    UpdateIf(
     'ThankYouCardList-Student-Donor', 
     Student_ID = 'sbox - ID'.Text,
     {St_Email: 'TxtInput-StEmailAddress'.Text}
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Jeffrey_H Profile Picture
    118 on at

    The code you suggested did not work.

     

    UpdateIf(
     'ThankYouCardList-Student-Donor', 
     Student_ID = 'sbox - ID'.Text,
     {St_Email: 'TxtInput-StEmailAddress'.Text}
    )

     

    Just checking to see if your code should go into "OnSelect" ?  That's where I believe it should go.

     

    UpdateIf('ThankYouCardList-Student-Donor', StudentID = 'sbox - ID'.Text, {St_Email: 'TxtInput-StEmailAddress'.Text})

    I tried this too since the column header was different.

    This did not work either.

    Jeffrey_H_1-1689801595239.png

     

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @Jeffrey_H ,

    The code is updating any records in 'ThankYouCardList-Student-Donor' where the Student_ID field matches the value in the Text box  'sbox - ID' and then updates the St-Email field in those records to the value in the text box 'TxtInput-StEmailAddress'. If this is all correct, the code needs to go anywhere that OnSelect of the relevant button.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Jeffrey_H Profile Picture
    118 on at

    Sorry to say that your code did not work for me.

  • Jeffrey_H Profile Picture
    118 on at

    I copied the app and exported my Sharepoint list (in an excel format) so you can take a look at the whole picture.

    I do understand that Excel and Sharepoint may take different code to communicate with the application, however please give me sample code for updating a Sharepoint list.

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @Jeffrey_H ,

    That is because your field name is Email (not st-email as you posted)

    UpdateIf(
     'ThankYouCardList-Student-Donor', 
     Student_ID = 'sbox - ID'.Text,
     {Email: 'TxtInput-StEmailAddress'.Text}
    )

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard