cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kathryn_Marie
Level: Powered On

Combobox default values from csv

Hi All,

 

I have a table of questions which a user can add to, and I want them to also be able to edit them. the value of 'Stage' is stored in the table as a csv, and when on the edit page, I want to populate my combo box with the previous items they selected. I was trying to use the split function but it is not seing the item as text, it sees it as a table. Any ideas how I can split the values in the table to use them as the default values when updating previous selections?

 

TaError.png

1 ACCEPTED SOLUTION

Accepted Solutions
Kathryn_Marie
Level: Powered On

Re: Combobox default values from csv

I got it!!

 

I need to add the detail to defaultselecteditems (not default), and use this code:

 

If(";" in DataTable3.Selected.Stages,ForAll(Split(DataTable3.Selected.Stages,";"), Result),[DataTable3.Selected.Stages])

 

That only took all day! Thanks for your response though Russel 🙂

View solution in original post

6 REPLIES 6
Microsoft RusselThomas
Microsoft

Re: Combobox default values from csv

Hi @Kathryn_Marie ,


The Default: property of the DropDown control is looking for a single record from the DropDown items to set as the default entry.  You should probably be looking to change the Items: property to create the dropdown list items before choosing the default entry.

Also, your list of entries is comma separated, but your split command is looking for a semi-colon.

Try this;
Set the Items: property of the DropDown to 

Split(ThisItem.Stages, ",")

Then, if you actually want a default entry set, set the Default: property to either the value of a specific entry - i.e. "Stage 1", or the value of the data field containing the current stage, or leave it out to be blank on start.

Hope this helps,

RT

Kathryn_Marie
Level: Powered On

Re: Combobox default values from csv

Thanks Russel,

 

If I set the split as the item property, it splits correctly but doesn't show all the values I need, just the ones the user selected the first time. I want them to be able to update from the full list.

 

Cheers

Kathryn

Microsoft RusselThomas
Microsoft

Re: Combobox default values from csv

Hi @Kathryn_Marie ,

 

Ok, perhaps a few clarifying questions first:

 

  • Why the combobox - can users select more than one stage at a time, and do you then want to filter something as a result by multiple stages?
  • What is this selection doing?  i.e. what actions are taken as a result of the user making their selection?
  • When you say it just shows what the user selected the first time - what do you mean?  It should show what the values are for that particular row's Stages field - is that not what you want?

One last thought - Comboboxes have a sticky memory, so previously selected Items would need to be cleared between selections - you can use the Reset() function to do this.

Kind regards,

RT

Kathryn_Marie
Level: Powered On

Re: Combobox default values from csv

Thanks, I've added my answers:

 

  • Why the combobox - can users select more than one stage at a time, and do you then want to filter something as a result by multiple stages? Yes, they can select multiple stages, and this is the edit page so they can go back and update those selections if required.
  • What is this selection doing?  i.e. what actions are taken as a result of the user making their selection? Once the user has made the changes, I will just write the updates back to the table.
  • When you say it just shows what the user selected the first time - what do you mean?  It should show what the values are for that particular row's Stages field - is that not what you want? Yes, but not as it it stored in the table. I need to split it first so they are selecting from the list again. I don't want it to show "stage 1, stage 3" as the selection.
Kathryn_Marie
Level: Powered On

Re: Combobox default values from csv

I got it!!

 

I need to add the detail to defaultselecteditems (not default), and use this code:

 

If(";" in DataTable3.Selected.Stages,ForAll(Split(DataTable3.Selected.Stages,";"), Result),[DataTable3.Selected.Stages])

 

That only took all day! Thanks for your response though Russel 🙂

View solution in original post

Microsoft RusselThomas
Microsoft

Re: Combobox default values from csv

Awesome, well done!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,189)