Hi All,
I have a "Single-Select" Combobox with the items populated by a collection called "WorkOrderTable". I would like to set the default selection using formulas but have been unsuccessfull. I tried setting the "Default" property with the formulars shown below:
However no default selection is shown:
How do set the default selection of a combobox using formula?
Solved! Go to Solution.
If you want by default to have selected item then put your code from Default into DefaultSelectedItem property of combobox
If you want by default to have selected item then put your code from Default into DefaultSelectedItem property of combobox
OMG!
After stuggling with how to set a default for a Combobox versus a regular dropdown or lookup fo rthe last 2 DAYS I stumbled upon this post.
Everything is the same as a regular Dropdown - meaning you use the wacky stuff below in the default of the datacard holding the combobox Except - see the trick below.... Here is a sample of the entry in teh default of the datacard
{ '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:0,
Value: "20"}
The trick is to go into the combobox and set the property "DefaultSelectedItems" property in the data section of the combobox control to Parent.Default ... it is blank when you create a new datacard... I was putting Parent.Default into the Default property DOH!!! I want my 2 days back now 🙂
I just did the same thing. Two days of searching and then I found this post. However, I'm getting it to return a defualt result but then it doesn't show the results overall or even the value that is selected in the field. Just that something is selected.
make sure to set the update property of the data card that holds the combobox to the combobox.selected.. you follow?
I wasn't using a datacard with my combo box but I was able to work through the issue. Turns out that when I added the defaultselecteditems property, it decided to change what values it was returning back. I had to change the DisplayFields and SearchFields back to what I originally had on that combobox and everything worked perfectly. Thanks for the help though!
Hi,
I'm also having same kind of issue.
In my scenario,
I have a combo box which will be filtered based on values we choose from a Dropdown
DropDown= A, B,C
when a user selects A,C then there will be only 1 value in the combo box,
But when they choose B there will be multiple options on Combobox they need to select.
What my issue is: When a user selects A,C from dropdown a textbox should be populated with Combobox value automatically, but when user selects B they should be able to select options from combobox values.
How can i set the properties.
texbox needs to be populated conditionally. like when they select A,C from dropdown then the textbox value should be the only value from combobox.
When they select B from the dropdown, they should be able to select 3 values from combobox and populate into the textbox.
textBox= Concat(combobox.SelectedItems,Result&",")
This is the formual i used on textbox.So what ever user selects on combobox will bepopulated into textbox
But textbox should be set to default combobox option when they select A,C from dropdown
use ForAll function in DefaultSelectedItems property
ForAll(tableSource,Result)
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |