cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Combo box data is not reflected in the edit mode of the form

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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:1.JPG

 

2.JPG

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 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Super User II
Super User II

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. 

It doesn't work for me. Please see I tried this as well (Attched picture)

Again my question is :

I am trying to get the selected location in my edit form .

The items property of my lcoation combobox is shown in attached picture.

Since multiple selection is false, and change your default to Combobox2.Selected.Result. Your current default is for multiple items.

The Update function of the card containing the combobox should be Combobox2.Selected.Result

Thanks for your response.

I tried both but it gives me an error.

 

Pleasse see the attached

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

Community Support
Community Support

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:1.JPG

 

2.JPG

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 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

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

combobox1.PNGcombobox2.PNG

 

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

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (17,586)