SharePoint column is a lookup column - New Form - Want to set the default value of the lookup field (ComboBox control) to be the value in the Gallery Selected ID
Trying this
{ID: galdcp.Selected.ID, Value:Value(galdcp.Selected.ID)}
no error but no value
If I change the control to a dropdown, and create a label with galdcp.Selected.ID as the text, then set the default to be the label.text it works .... but clearly not the best way to go 🙂 All help welcome - thx
@JohnM86 One quick problem - When I submit the form the default values aren't updated in the columns. Is there one more thing I need to do? Thanks much!
To set the default value of a lookup field (ComboBox control) to be the value in the Gallery Selected ID, you can try the following:
Make sure that the lookup column in SharePoint is set to allow multiple values if the ComboBox control allows multiple selections.
Set the Items property of the ComboBox control to the list or library that the lookup column is connected to.
Set the DefaultSelectedItems property of the ComboBox control to the following formula:
This formula sets the default value of the ComboBox control to the item with the ID that is selected in the Gallery.
If you are still having issues, make sure that the value of the ID in the Gallery is the same data type as the ID column in the SharePoint list. Also, make sure that the gallery item is selected before the ComboBox control is loaded on the form.
I hope this helps!
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional