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 Apps
Answered

Patch text label

(0) ShareShare
ReportReport
Posted on by 16

Hello,

 

I have two SharePoint lists, 'Training Events Data' and Training Events Delegate'.

 

The former holds records for all the events including course name, start and finish dates and times and each event has it's own unique ID (EventID).

The latter is to store the records if the delegates who've booked on to one of the available courses.

 

I want to patch the ID of the event from Training Events Data to Training Events delegates (Event ID) so I can use a count function to count how many users have signed up to that event.

 

In my Gallery, I have a text label titled "lbl_ID" which pulls the Event ID using "ThisItem.EventID' on the selected event.

 

I then have a button to book the selected event which is used to patch the details of the course to my Training Events Delegates list.

 

Patch ('Training Events Delegates', Defaults('Training Events Delegates'),
{
Title: Gallery_Select_Course.Selected.Value,
'Start Time TED': Gallery_TimeSlot.Selected.'Start Time',
'End Time TED':  Gallery_TimeSlot.Selected.'End Time',
'Event ID': lbl_ID.Text
//'Delegate TED':lblDelegate.Value
});
Notify("Your training event has now been booked, you will receive an email confirming the details)",NotificationType.Success)
 
Title, Start Time TED, End Time TED are all patching successfully. The label is successfully showing the EventID from Training Event Data but it's just not passing a value over. Both respective ID columns in each SharePoint list are text columns, I've tried multiple variations of the formula IT hasn't worked.
 
I've also tried 'Event ID': 12345 and it successfully passes the 12345 over.
 
Any ideas?
Categories:
I have the same question (0)
  • Fredrik_A Profile Picture
    3,403 Super User 2026 Season 1 on at

    Try this:

    'Event ID': Value(lbl_ID.Text)
  • Lowdonl Profile Picture
    16 on at

    Doesn't work I'm afraid. The rest of it patches successfully.

     

    No error message in the formula.

  • LowCodeJim Profile Picture
    314 Moderator on at

    If the label is taking the value of "ThisItem.EventID" why not just patch that rather than the labels text?

     

    'Event ID': ThisItem.EventID
  • Lowdonl Profile Picture
    16 on at

    I get an error with this one;

    Lowdonl_0-1719583305952.png

    you'll see circled where my text label is  successfully showing the EventID. 

     

    EventID is a calculated column that displays as text

     

    Lowdonl_1-1719583423389.png

    and Event ID is the receiving SharePoint is a text column;

     

    Lowdonl_2-1719583457320.png

    I did originally use the default ID column from the Training Events Data SharePoint list but I was having the same issue so I've attempted creating my own unique ID but running in to the same problem.

  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    @Lowdonl ,

    SharePoint calculated columns simply do not "play well" with Power Apps and should be avoided. Your experience is one example why. You need to do the calculation in Power Apps

  • Lowdonl Profile Picture
    16 on at

    I appreciate that but I get the same issue if I use the standard ID column from the SharePoint list, which is a number field and I try and patch it to another column that I've set up as a number field.

  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Lowdonl ,

    Can you please post the code you refer to - you should be able to post the ID to a number column.

  • Lowdonl Profile Picture
    16 on at

    Sure, in this scenario, the source SharePoint list is 'Training Events Data' with ID column "ID" and the receiving SharePoint list is 'Training Events Delegates' and the ID column is 'Event ID 2'.

    I still have my text label 'lbl_ID' displaying the correct value by using formula;

    ThisItem.ID

    For the patch, I've tried;

    'ID': lbl_ID.Text

    Patch ('Training Events Delegates', Defaults('Training Events Delegates'),
    {
    Title: Gallery_Select_Course.Selected.Value,
    'Start Time TED': Gallery_TimeSlot.Selected.'Start Time',
    'End Time TED': Gallery_TimeSlot.Selected.'End Time',
    'Event ID 2': Value(lbl_ID.Text)
    //'Delegate TED':lblDelegate.Value
    });
    Notify("Your training event has now been booked, you will receive an email confirming the details)",NotificationType.Success)

    In addition to;

    'Event ID 2': Gallery_Book_Course.Selected.lbl_ID
    'Event ID 2': Gallery_Book_Course.Selected.ID
    'Event ID 2': Value(Gallery_Book_Course.Selected.ID)
    'Event ID 2': ThisItem.ID

  • Verified answer
    WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    @Lowdonl ,

    Assuming the SharePoint ID is in the record being displayed in the Gallery and you are patching to a Number column, then this should work

    'Event ID 2': Gallery_Book_Course.Selected.ID

     

  • Lowdonl Profile Picture
    16 on at
    That worked, thank you very much!

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