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

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
Highlighted
Helper III
Helper III

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
Highlighted
Microsoft
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

Highlighted
Helper III
Helper III

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

Highlighted
Microsoft
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

Highlighted
Helper III
Helper III

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.
Highlighted
Helper III
Helper III

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

Highlighted
Microsoft
Microsoft

Re: Combobox default values from csv

Awesome, well done!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,646)