Hey @aboucher, you are close! There is one property missing from your Patch statement: the Base Record. In between your data source and the record to be changed you need something to tell the Patch statement what to patch, either a new record or updating an existing one.
Also, your reference to the combo box isn't fully qualified to reference the item you are trying to patch. It is instead referencing the control. To reference the selected value, you would have:
cboDestination.Selected.*Value*
where *Value* is the name of the field you are wanting to patch.
To create a new record, you would use the Defaults function like so:
// Patch a new record
Patch(
tblPass,
Defaults(tblPass),
{Destination: cboDestination.Selected.*Value*}
)
To update a record, you would need something that identifies the specific record you are trying to change. Using a LookUp is one nice way but you could also reference a selected item in a gallery or some similar technique. I'd be happy to help out with the specifics of that if you would like but here are some examples:
// Patch an existing record with LookUp
Patch(
tblPass,
LookUp(tblPass, ID = varItemID),
{Destination: cboDestination.Selected.*Value*}
)
// Patch an existing record with a gallery item
Patch(
tblPass,
Gallery.Selected,
{Destination: cboDestination.Selected.*Value*}
)
The important aspect is that it needs to be a Record (i.e. row of the table) that is referenced.
I hope that gets you going with your Patch statement! Please let me know if I can clarify or offer further assistance!