Hi,
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:
formname.ID
I get none
If I try comboboxName.SelectedItem.ID
Same result...
How can I get the ID from the selected training in the combobox?
Combobox can return multiple values. So we have to use First
First(ComboboxName.SelectedItems).Value
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....
LookUp(yourList,Name=comboBoxName.Selected.Result,ID)
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
Choices([@IssueTracker].SingleEvent)
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
First(DataCardValue12.SelectedItems).Value
If the combo box is multi-select then
Concat(ComboboxName.SelectedItems.Value,Value,",")
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
EventIItinerary.Title
then to get the value is
First(DataCardValue12.SelectedItems).Title
You may need to use Result to get ID
comboBoxName.Selected.Result
I did this and worked: LookUp(dbase;Title = ComboBoxName.Selected.Name;ID)
Thankyou guys!
Can you share some screenphotos? I cannot seem to get it to work
replied to wrong post and now can't delete the comment, whoops
User | Count |
---|---|
263 | |
110 | |
98 | |
55 | |
40 |