Hi guys,
I have a combox for the locations and the location datasource is coming from SQL table. However, when I submit the form I am not getting the selected location in my combobox in my edit form page.
And on the items property of combobox is my syntax Distinct () which is used to distint certain coloums and only use them in my combobox.
Can someone guide me on this?
Solved! Go to Solution.
Hi @asdeev,
Which type column (location column) do you use to store the selected value within the Combo Box in your data source?
I suppose that you use a Text type column to store the selected value within the Combo Box in your data source, is it true?
Based on the issue that you mentioned, I think there is something wrong with the formula you provided within the DefaultSelectedItems property of the Combo Box control.
I have made a test on my side, please take a try with the following workaround:
Set the Items property of the Combo Box control (on your side, it is Location Combo Box) to following:
Distinct('20190104_case6',TaskName) /* <- '20190104_case6' represents my SP list data source, on your side, you shold type your SQL table data source*/
On your side, you should type:
Distinct('YourSQLTable',TaskName)
Set the DefaultSelectedItems property of the Combo Box control to following:
{ Result: "PowerApps" }
On your side, you should type:
{ Result: ThisItem.LocationColumn /* <- LocationColumn represents the Text type column which you use to store the selected value within ComboBox control in your data source */ }
or
{ Result: Parent.Default }
Best regards,
Kris
Hi @asdeev,
When you use the Distinct() function on a datasource that is the Items property of the Combobox control, the effect is to produce a single column table with the column name being Result.
Let's say your combobox inside of the card in the Edit form is named Combobox1, you will need to look at the Update property of the card containing the combobox says: Combobox1.Selected.Result or Combobox1.Selected.Value, either should work.
Hi @asdeev,
I was looking at one of my apps for a card containing a combobox and saw that the Update() property of the card was simply Combobox1.Selected
Also the DefaultSelectedItems property of the Combobox in the card was Parent.Default
Hi @asdeev,
Which type column (location column) do you use to store the selected value within the Combo Box in your data source?
I suppose that you use a Text type column to store the selected value within the Combo Box in your data source, is it true?
Based on the issue that you mentioned, I think there is something wrong with the formula you provided within the DefaultSelectedItems property of the Combo Box control.
I have made a test on my side, please take a try with the following workaround:
Set the Items property of the Combo Box control (on your side, it is Location Combo Box) to following:
Distinct('20190104_case6',TaskName) /* <- '20190104_case6' represents my SP list data source, on your side, you shold type your SQL table data source*/
On your side, you should type:
Distinct('YourSQLTable',TaskName)
Set the DefaultSelectedItems property of the Combo Box control to following:
{ Result: "PowerApps" }
On your side, you should type:
{ Result: ThisItem.LocationColumn /* <- LocationColumn represents the Text type column which you use to store the selected value within ComboBox control in your data source */ }
or
{ Result: Parent.Default }
Best regards,
Kris
Hi @asdeev thank you for posing this question. Can you review the two latest replies and advise if it brings you closer to a solution?
@Anonymous
Hi @Drrickryp ,
In my case, I was using office365.User to get/Search users from(AD Users) using the combo box,(can able to get users)
so it just a normal text field(SQL Table field) initially then I just replaced the textbox with Combo Box in form.
Now I used the below formula at the DataCard level to update the Combo box value.
even ComboBox.Selected.Mail (Since i need to update email for the selected User in to SQL table Field)
also i tryied with ComboBox.SelectedItems : it throughs error Expected Text Value
Finally, I tried like
ComboBox.Selected.Mail , Some how it's working it seems.
DefaultSelectedItems: {DisplayName: ThisItem.SPA_for_Evaluation}
But here the issue is when an item is in edit mode ComboBox values is not getting displaying, it's just displaying only recent updated value
example
Assume that Updated like User1, User2, then its updating with the only User2, but not User1 and User2,
Also when an item is in edit mode it`s displaying the only User2, but not User1 and User2.
How to update multiple values using ComboBox also when an item is in edit mode need to display to update.
Please reply
User | Count |
---|---|
221 | |
98 | |
94 | |
55 | |
34 |
User | Count |
---|---|
273 | |
106 | |
105 | |
60 | |
60 |