I have a SharePoint list and one column is a lookup.
I have a PowerApp build stand alone (not integrated in SharePoint).
The lookup field works fine, but I would like to set a default option.
I have been able to get the words that I want to show up as the default selected item, but on Submit doesn't populate the SP List.
From reaching looks like I need ID and Value. Have read several articles:
https://sympmarc.com/2018/02/05/powerapps-setting-a-sharepoint-list-lookup-column/
https://docs.microsoft.com/en-us/microsoft-365/community/working-with-cascading-lists-in-sharepoint-and-powerapps
https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-and-SharePoint-Lookup-Columns/m-p/104177
https://techdailychronicle.com/handling-sharepoint-lookup-and-people-fields-in-powerapps/
https://www.c-sharpcorner.com/article/set-a-default-value-of-the-look-up-column-in-powerapps-new-form/
But I'm still not getting it to work?
On the combobox I am trying this for the default and defaultselecteditems
{
'@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: LookUp('Titles and Roles',Title = Office365Users.MyProfileV2().jobTitle,ID),
Value: Office365Users.MyProfileV2().jobTitle
}
On the card for update I have tried:
DataCardValue2.Selected
And
{
'@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: LookUp('Titles and Roles',Title = Office365Users.MyProfileV2().jobTitle,ID),
Value: Office365Users.MyProfileV2().jobTitle
}
But neither worked. No errors, just doesn't add to the list.
I dont want to do a patch because I have a flow that runs on create. So if I did a patch after the create, not sure it would pick it up?
Thanks,
Terry