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.
@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 }
);
I have the "ID" field or "gblRecordID" which is a #. But neither of these options work
@wonka1234 which record would you like to update and do you have the record or ID stored somewhere? (or selected via a Gallery)
@LaurensM Yes update a record. However my button isnt in a editform or gallery. ITs just on a screen.
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!
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional