Is there a better way to set this up?
I want to be able to allow a combobox to allow multiple selections and a fill-in. If this is possible, when another use opens the form, I only want the default choices, but not the new fill-in values.
Example:
Default:
A
B
C
D
Other
Not wanted:
A
B
C
D
Fill-in value
Fill-in value
Other
If it is possible to not add the new fill-in values to the ComboBox. but if we have to allow the fill-in values than it would be Ok..
"You want to update the option in the choice column only if the option exists."
No, I do not to save the "other" selection that the end user types as a new dropdown choice item.,
I only want that default choices to remain, the "other" items can be saved with the form, but not as a new choice for the dropdown.
and I didn't accept this as a solution.. as it is not working the way I'm trying to solve.
Hi @SPS-DEV-22 ,
It is not possible to save non-existing option values to the Choice column of the SP List. You want to update the option in the choice column only if the option exists.
My suggestion is that you change the original choice column to Text type, and then set your Combo Box Items to:
["A","B","C","Other"]
Then create a Text Input to allow user to enter different values and set the Display Mode of the Text Input to make it editable only when the user selects 'other'. At this point, you can update the user-entered value into the data source.
If("other" in ComboBox.SelectedItems,DisplayMode.Edit,DisplayMode.Disabled)
Hope my answer is helpful to you!
If my answer solves your problem, I hope you can accept it as a solution.
Best regards,
Rimmon Li
Still waiting for a response, I gave you an answer to your question.
I did in fact try your solution offered, however, as my replay says I have to allow multiple selections and the "Other" item still gets placed as a selection for the next end user which is not what I want.
any clue on how to solve this?
I did put my code sample for the combobox in thread
Ok, I understand this code, however, I need to allow end Users to select more than 1 item and be able do a Fill-in for the dropdowns.
Also, the "Other" item keeps getting Added to choices, the Filter item is not filtering out the new Choice item.
How do I get the fill-In to work along with keeping the other selected items?
here is how I setup the "Other" Choice:
Update= If(ErrorMessage18.Visible, Blank(), cmb_Name.Selected.Value="Other", {Value: txt_Name.Text}, cmb_Name.Selected )
DataCard Code:
********************************************************
Icon Code:
visible=!cmb_Name.Visible
txt_Name Code:
************************************************************
cmb_Name Code:
DefaultSelectedItems=Filter(Choices([@'SharePoint Form'].Test_Combobox),Value="Choose"||Value="A"|| Value="B" ||Value="C"|| Value="Other")
Items=Ungroup(
Table(
{DropdownOptions: Choices([@'SharePoint Form'].Test_Combobox)},
{DropdownOptions: ["Other"]}
),
"DropdownOptions"
)
Self.Selected.Value<>"Other"
DefaultSelectedItems
Filter(Choices([@'SharePoint Form'].Test_Combobox),Value="Choose"||Value="A"|| Value="B" ||Value="C"|| Value="Other")
IsSearchable = false
Visible= Self.Selected.Value<>"Other"
*********************************************************************
I believe that is all the code for the "Other". however, the "Other" does not keep the prior selections and with your code added it still adds the NEW Other typed value to the Dropdown. even with the Filter.
Let me know if you have any questions
Hi @SPS-DEV-22 ,
Do you set items of Combo Box like I did?
Choices([@SPList].choiceColumn)
and if so, then this code meets your need to set default options, and the user can change the options.
Filter(Choices([@SPList].choiceColumn),Value="Choice 1"||Value="Choice 2")
The effect of this setting is that whenever a new form is opened, the default options in Combo Box are choices that match the filter criteria.
Note: "Choice 1" is name of my choice.
Best regards,
Rimmon Li
Rimmon Li
Your Question :
Could you tell me how do you create the Combo Box and what are your ComboBox items? If it comes from a column of SP list, is that column a selection type?
A) It is a column in SP List. It is a Choice Column with A B C D E and allow Fill-In.
that is where it gets tricky, when you do the fill-In for the column the items get added to the Choice Column Selections available, End User does not want them to be added to the Available Selections, just the default choices.
Q) Then set the On Select of a button like this:
SubmitForm(Form1);
NewForm(Form1)
A) Instead of On Select I have the above code OnSuccess, I do have required fields, actually all my form fields are required and All fields in the form are required prior to a OnSuccess.
Question about this code and where does this code go if it answers question below:
Filter(Choices([@SPList].choiceColumn),Value="Choice 1"||Value="Choice 2")
Will this prevent the Fill-In items from being added to the Dropdown selection Choices as they are Added as "Other"
I use the "Other" to allow fill-In but then it gets added as a Selection Choice for the ComboBox(Dropdown).
Hi @SPS-DEV-22 ,
Could you tell me how do you create the Combo Box and what are your ComboBox items? If it comes from a column of SP list, is that column a selection type? If you want to update the record in SP list from the Form, note that once the Form connects to the data source, it can update or create a record.
1)For your first question: you can set the property of Combo Box to allow multiple selections.
2)For your second question, I'm assuming items of your Combo Box are set up like this:
This means that your Combo Box comes from the Select Type column in the data source.
If you want to update multiple choices to the data source, you need to first set this selection column to allow multiple selections.
Then set the On Select of a button like this:
SubmitForm(Form1);
NewForm(Form1)
3) About how to set the default selected choices of Combo Box:
Set the DefaultSelectedItems of Combo Box:
Filter(Choices([@SPList].choiceColumn),Value="Choice 1"||Value="Choice 2")
Best regards,
Rimmon Li
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1