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

Unable to concat Combobox Selected Items

Hi everyone,

 

So, I have a dropdown in which I select a single option for both and a Combobox that displays some results that depend on the selected item of the dropdown. In ths combobox I can choose several items but I have an issue trying to Concat and save it into a Collection. All the information comes from a Sharepoint List called "Geografia".

 

My dropdown contains the next formula in it's Items property:

Sort(Distinct('Geografia';Nombre);Result) 

 

While the Combobox looks quite different:

Distinct(Filter('Geografia';Region=Dropdown.Selected.Result);Centro))

 

The issue is that if  I set a label with the following formula:

Concat(ComboBox.SelectedItems;",")

 

The result looks like this: , , , 

 

Knight23_0-1603352992338.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User III
Super User III

That sounds like good progress! At this point, you should be able to recombine your formula like so.

In the formula, I would also make sure to spell "Value" with a capital V, because it'll be case sensitive when you refer to the selected items in your call to Concat.

If(!IsBlank(DD_Zona_5.Selected.Result);
    AddColumns(
           Distinct(Filter('Geografia';Region=DD_Zona_4.Selected.Result);Nombre_Centro));
           "Value";
           Result.Value
    );
    Choices([@'Geografia PD'];Nombre_Centro)
)

View solution in original post

20 REPLIES 20
timl
Super User III
Super User III

Hi @Knight23 

Can you try the following to see if that works better for you?

Concat(ComboBox.SelectedItems; Centro & ",")
Knight23
Frequent Visitor

Hi @timl ,

 

I tried as you mentioned but I get the next message:

 

Knight23_1-1603372965222.png

 

"Invalid name. Cannot recognize the identifier. This error appears when a formula references an element that no longer exists"

 

 

 

I also tried using Thisitem.Centro and ThiRecord as they're listed in the options and I get the following error:

 

Knight23_0-1603372635053.png

 

"Invalid argument. One of the following was expected: Text, Number, Boolean, OptionSetValue, ViewValue."

 

My combobox is set inside a gallery and the source Sharepoint column is a list of options 

 

timl
Super User III
Super User III

Hi @Knight23 

Thanks for clarifying this. Does this work any better?

Concat(ComboBox.SelectedItems; Result & ",")
Knight23
Frequent Visitor

Doesn't seem to work either 😞

 

I get the same "invalid name/unknown identifier" message.

 

Knight23_0-1603377260349.png

 

timl
Super User III
Super User III

Hi @Knight23 

So that we diagnose this further, can you store the results in a collection so that we can see the column headers?

To do this, add a button inside your gallery where your combobox is and set the OnSelect property to the following:

 

ClearCollect(colTest; ComboBox.SelectedItems)

 

If you select some items in your Combobox and click the button, can you view the colTest collection in the File > Collections menu, check that it contains the items that you expect, and post a screenshot of what you see here?

Knight23
Frequent Visitor

Interesting, I selected 5 items in the combobox, collected them as you suggested and the result is as follow:

 

Knight23_0-1603381287057.png

There's no collection at all.

timl
Super User III
Super User III

That's useful because that explains why your call to Concat doesn't work!

The next step is to work out why this is showing up as empty. Can you confirm that ComboBox is definitely the name of the combobox in your gallery?

Knight23
Frequent Visitor

Yes! Combobox is definetly the name of my combobox.

 

Knight23_0-1603381968921.png

 

timl
Super User III
Super User III

In your label, if you type the following...

First(ComboBox.SelectedItems).

can you confirm or screenshot the column name suggestions that appear in the formula bar after the dot symbol?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,426)