cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Edit Form not showing selected item in combo box

Hi,

Problem : In "Edit Form" selected value is now showing in combo box.
--------

My Approach: 

  1. I am using same form for New and Edit.
  2. I have collection like below.
  3. ClearCollect(colItems,Distinct('List 1','Column Name'));Collect(colItems,{Result:""}).
  4. i created custom combo box in "form datacard" and bind this collection to combo box  properties like below. 

               items -----------  SortByColumns(colItems,"Result",Ascending) 

               onChange  ------- UpdateContext({varCol:combobox.selected.Result})

       4. Form Datacard  --- default property ----  varCol/comnobox.selected.Result (i tried both).  when submitting                                                                                    the form data is storing in to list.

       5. From gallery when i selected the item i am setting Set(varCol,glry.Selected.ColumnName)

           while editing item is not selecting in the combobox.


I tried another approach instant of variable i set Datacard ---- update property ---- combobox.selected.Result
                                                                                                    Default property ---- combobox.selected.Result

 

 

Thanks & Regards,

Brahmaji

 

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @Brahmaji ,

 

What is the coulmn type in your SP list? single line or what?

Do you want to save more selected items into the datacard or just one selected item by combobox?

I test with single line and save multiple selected items to the datacard.

Add one button,Button3.OnSelect:ClearCollect(colItems,Distinct('20190329combobox',NameS));Collect(colItems,{Result:""})    ('20190329combobox' is my sp list name, NameS is the column name,its column type is single line)

Add  one Gallery, Gallery.Items:colItems  (if you want the gallery show the datasource's data, you can choose '20190329combobox' )

Add one ComboBox control into the datacard,ComboBox2.Items:SortByColumns(colItems,"Result",Ascending) 

DataCardValue7.Default:Concat(ComboBox2.SelectedItems,Result&",") 

savecomboboxvalue.PNG

 

Result test:

20190329savecombobox.gif

 

If you do not save multiple selected items, you just only:

DataCardValue7.Default:ComboBox2.Selected.Result

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

 

Highlighted

Hi Yumin,

Thanks.

I followed ur steps and created single value selection in combobox.For value storing in list is working.

I have list column type is Single Line of Text.

 

My problem is when i select an item in gallery, item value is not selecting in combox.

 

Thanks & Regrds,

Brahmaji.

Highlighted

Hi @Brahmaji ,

 

Do you mean if you select one item in gallery and your form's combobox will show it automatically?

 

Best Regards.

Yumia

Highlighted

Hi,

Yes, When i select an item in gallery that value is not selecting in combo box.

Eg:

      In gallery i have 3 records with values  item1,item2,item3.

     when i select second row (item2) - this value has to select in combobox automatically.

 

Thanks,

Brahmaji.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,959)