Hi PowerApps community,
I've made a canvas app, with a gallery filtered by three combo boxes. The data source is a Collection filled by a Dataverse instance.
The image below, shows the app when i open it the first time.
This is the ITEMS selection FX of the gallery.
If(IsBlank(ComboBox1)
&& IsBlank(ComboBox1_1)
&& IsBlank(ComboBox1_2),TempCompetences
If(Not(IsBlank(ComboBox1))
&&Not(IsBlank(ComboBox1_1))
&&Not(IsBlank(ComboBox1_2)),
Filter(TempCompetences,Person.Person exactin ComboBox1.SelectedItems.Person,Product.Product exactin ComboBox1_1.SelectedItems.Product,Value.Value exactin ComboBox1_2.SelectedItems.Value),
If(Not(IsBlank(ComboBox1))
&&(IsBlank(ComboBox1_1))
&&(IsBlank(ComboBox1_2)),
Filter(TempCompetences,Person.Person exactin ComboBox1.SelectedItems.Person),
If(Not(IsBlank(ComboBox1))
&&Not(IsBlank(ComboBox1_1))
&&(IsBlank(ComboBox1_2)),
Filter(TempCompetences,Person.Person exactin ComboBox1.SelectedItems.Person,Product.Product exactin ComboBox1_1.SelectedItems.Product),
If(IsBlank(ComboBox1)
&&Not(IsBlank(ComboBox1_1))
&&(IsBlank(ComboBox1_2)),
Filter(TempCompetences,Product.Product exactin ComboBox1_1.SelectedItems.Product),
If(IsBlank(ComboBox1)
&&(IsBlank(ComboBox1_1))
&&Not(IsBlank(ComboBox1_2)),
Filter(TempCompetences,Value.Value exactin ComboBox1_2.SelectedItems.Value),
If(IsBlank(ComboBox1)
&&Not(IsBlank(ComboBox1_1))
&&Not(IsBlank(ComboBox1_2)),
Filter(TempCompetences,Product.Product exactin ComboBox1_1.SelectedItems.Product,Value.Value exactin ComboBox1_2.SelectedItems.Value))))))))
below the image after selection.
Below an image after deselection
The initial selection works fine, but when i deselected a item, no results are displayed. What can i do to fix this?
All help is appreciated.
Solved! Go to Solution.
Please consider changing your Formula to the following:
Filter(TempCompetences,
(CountRows(ComboBox1.SelectedItems)=0 || Person.Person exactin ComboBox1.SelectedItems.Person) &&
(CountRows(ComboBox1_1.SelectedItems) =0 || Product.Product exactin ComboBox1_1.SelectedItems.Product) &&
(CountRows(ComboBox1_2.SelectedItems) =0 || Value.Value exactin ComboBox1_2.SelectedItems.Value)
)
I hope this is helpful for you.
Fixed it, I had to put [] in the default Items selection property for each of the comboboxes.
Please consider changing your Formula to the following:
Filter(TempCompetences,
(CountRows(ComboBox1.SelectedItems)=0 || Person.Person exactin ComboBox1.SelectedItems.Person) &&
(CountRows(ComboBox1_1.SelectedItems) =0 || Product.Product exactin ComboBox1_1.SelectedItems.Product) &&
(CountRows(ComboBox1_2.SelectedItems) =0 || Value.Value exactin ComboBox1_2.SelectedItems.Value)
)
I hope this is helpful for you.
Awesome, this work's!! Thank you so much.
I'm sorry, i have one more question, tried to figure it out by myself, but i can't get it working. If i start the app the first time, now my Gallery is empty, the comboboxes now start's working after i selected an item in each one of them, but not if they are empty or after is select a single item.
You appear to have a value in the one combo...where and why is that getting set?
That is a custom field in my custom value entity/table. It's basically a score to show how good someone is in a certain Competence/Product. This screenshot is taken right after i selected "4", the first time the app starts. I want it to show every record with the value "4". If i would select a value in the other comboboxes, the formula starts behaving as i want, but it works not from the start. I show you a screenshot with the next steps, where i select the other comboboxes and then deselect.
Fixed it, I had to put [] in the default Items selection property for each of the comboboxes.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
178 | |
52 | |
41 | |
36 | |
28 |
User | Count |
---|---|
240 | |
82 | |
71 | |
69 | |
66 |