I have two SharePoint lists:
EmpDB (main data source) with look up fields Location, Location: STATE, Location: COUNTY
LUList (Location lookup source) with Title (Location), STATE, COUNTY
When I choose the Location in my canvas app, Location populates and Location: STATE and Location: County auto-populate. After I submit the form and go back into the item in the canvas app, Location is blank but the value did push to the SharePoint list. Location: STATE and Location: County hold the values and pass to the SharePoint list but if I change the value of the Location, the Location: STATE and Location: County do not change. I have done a lot of research and cannot seem to come up with a solution.
The following are the location properties:
Location.Update:
If(
!IsBlank(LULocationDataCardValue),
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: LULocationDataCardValue.Selected.Id,
Value: LULocationDataCardValue.Selected.Value
}
)
Location.Items:
ShowColumns(
AddColumns(
GroupBy(
Choices([@EmpDB].Location),
"Value","Location"
),
"Id",First(Location).Id
),
"Value","Id"
)
Two questions:
1. What should be in the Location.DefaultSelectedValue property or how can I get the selected value in the Location field to stay in the canvas app?
2. How can I get the lookup fields based on Location to update OnChange of the Location field in the canvas app?
Thank you very much for your assistance in advance!