Hi,
I need some help with my Power App. It is integrated with a SharePoint document library. I brought in a 2nd list as a datasource to look up to based on other selected values in the app. For instance, Approver 1 populates based on the Vendor chosen. User chooses Vendor, Approver 1 has a lookup to a Vendor List that stores metadata about that vendor, such as Approvers, Payment Method, etc.
Datacards:
Vendor Name (DataCardValue2.Selected.Label) - Combo Box; Items - Datasource-SP Site "Invoice" Doc library site column; Managed Metadata type field in SharePoint
Approver 1 (DataCardValue8.Selected) - Combo Box; Items - Datasource - SP List "Vendor" site column (also tried using the doc library site column); Person or Group type field in SharePoint.
Here are my ComboBox fields:
Items - Vendor List
DefaultSelectedItems - LookUp(Vendor,'Vendor Name'=DataCardValue2.Selected.Label,'Approver 1')
Update: DataCardValue8.Selected
Default: ThisItem.'Approver #1'
The lookup works perfectly. It pulls the Approver's name from the Vendor lists and populates it on the form which I can save successfully to the SharePoint doc library.
The issue is, if I have to change the approver on the form, not use the default, and save it, it saves to the library approver tag but when I reopen the form to edit again, the selecteddefault from the SharePoint list resets and I lose the previous that I manually selected.
I have tried doing an IF statement, when form is new v edit. This didn't work because it appears that SharePoint Power Apps custom forms always open in edit mode.
I have changed the datasource for the combo box from the library to the list.
I added a defualt value.
PLEASE HELP! I have watched hours of YouTube videos and read many different blogs trying each and every option but nothing is working. Thanks.

Report
All responses (
Answers (