Notifications
Announcements
Hi,
Getting an error on this on the OnSelect of a button -
Patch('Intake', ID , {' Lead_three': Dropdown2.Selected.Value });
getting the error on my ID.
Why is this?
Thanks.
Hi @wonka1234,
Do you want to update a record? The second parameter will need a record reference, I will add some examples below:
Patch( 'Intake', <RecordReference>, {' Lead_three': Dropdown2.Selected.Value } ); //You can change <RecordReference> with e.g. ThisItem in a Form / Gallery, a record saved to a variable, Gallery.Selected... //Should the schema not fully match use {ID: ThisItem.ID} instead //In a ForAll you may need the optional ThisRecord. instead of ThisItem //Should you want to create a record use Defaults('Intake') instead
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!
@LaurensM Yes update a record. However my button isnt in a editform or gallery. ITs just on a screen.
@wonka1234 which record would you like to update and do you have the record or ID stored somewhere? (or selected via a Gallery)
I have the "ID" field or "gblRecordID" which is a #. But neither of these options work
@wonka1234, you will have to make sure that gblRecordID's value is the correct ID of the record you would like to update. Assuming the correct ID is saved, you can use the following structure to update your record:
Patch( 'Intake', {ID: gblRecordID}, {' Lead_three': Dropdown2.Selected.Value } ); //Alteratively try: Patch( 'Intake', LookUp('Intake', ID = gblRecordID), {' Lead_three': Dropdown2.Selected.Value } );
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 739 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 268