I need to retrieve the SharePoint List ID of a record when i select a item on a combobox
The case: I have 2 forms, the first form is used by the HR to create training meeting schedules (When a record of a meeting is created, sharepoint auto-creates an ID). The second form is used by employees to register for specific meetings. In this second form, I want to get the ID from the training meeting to link in the employees base.
In the employee screen, I have a combobox that brings a list of all the names of the training meetings available. When the employee selects the training that he(she) wants to participate, I want to send de training ID for the base.
If I try to get the id like this:
I get none
If I try comboboxName.SelectedItem.ID
How can I get the ID from the selected training in the combobox?
Combobox can return multiple values. So we have to use First
Is it your combo box accepts multiple selections?
I tried those:
First(ComboboxName.SelectedItems).Value - Did not work
First(ComboboxName.SelectedItems).ID - Did not work
First(ComboboxName.SelectedItems.ID) - Did not work
First(ComboboxName.SelectedItems.Value) - Did not work
The id is not recognized
It's not the most elegant solution, but you should be able to get it using a Lookup....
The ID you are trying to get is all based on the combo box items that you are filling.
For Example, I have an SP list and reference the Event SP List. So Combobox Items will
In this case, IssueTracker is Main or transaction SP List
SingleEvent is a column name for Event SP List
To get Id of the Combo box will be
If the combo box is multi-select then
If your combo box uses a filter or Distinct or data source then how to access the combo box varies.
In this example combo box items property is
then to get the value is
You may need to use Result to get ID