cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Checkbox default property set from multicolumns collection

Hello,

 

For a checkbox in a gallery, I am facing some difficulties to set correctly the property "Default".

 

Until now, the property was set from collection with 1 column like this :

ThisItem in SelectedCountry

Some days ago, I discovered how to use collection with more than 1 column but I cannot find the correct writing to set the same property.

For the moment, I stopped at this state :

ThisItem in SelectedFilter.Country

Below, screenshot of the checkboxes.

image.png

 

 

 

 

 

 

 

 

Anyone have the solution ?

 

Thx in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Checkbox default property set from multicolumns collection

Hi @MJKjoachim,

I'm not clear on what exactly happens after you check the boxes but it should be possible to use the Set() function to create a global variable that depends upon a selection in the Collection when you Navigate back to the original screen. IE. 

Back(); If(SomeCondition=true, Set(gvar, true), Set(gvar, false)

and make toggle's Default property:  gvar

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Checkbox default property set from multicolumns collection

Hi @MJKjoachim,

example2.PNGI may be mistaken but it looks like you want to filter a gallery by selecting one or more of the items in it. However, It is not clear what you are looking to do after selecting the items. If you just want to filter a datasource by selections from one of the fields, in this case country, I believe that it would be easier to use either a combobox control to do that and to filter the datasource based on the selections in the combobox.  In the figure on the right,  the Items property of the combobox is

 Sort(Distinct(Orders,City),Result)

This formula produces a single column table of unique cities with Result being the field name sorted alphabetically. The DisplayFields and SearchFields properties are ["Result"].

The Items property of the Datatable (you could use a gallery instead), is 

Filter(Orders,City in ComboBox1.SelectedItems.Result)

The datatable shows all of the orders that were made coming from Chicago and Boise.  

 

Highlighted
Advocate II
Advocate II

Re: Checkbox default property set from multicolumns collection

Hello Drrickryp,

 

Thank you for your answer !

 

My problem is slighty different, let's me explain more in details.

 

I have in Screen A  where a gallery lists all my customer.

In screen A, I have a toggle button used as filter on/off.

When activated, we navigate to another screen B where 2 galleries of filter is shown.

Gallery B1 is listing the country of customer (with distinct function)

Gallery B2 is listing the type of customer (with distinct function)

 

For each B1 and B2, when checkbox is selected, it feed a common collection with 2 columns (country, type).

 

When the customer have checked country/type , he can validate it with a button which automatically navigate to Screen A where the gallery if filtered according what is filled in the collections filter.

 

My problem now is when the customer come back to filter screen to modify the selection, I would like throug the "default" parameter of checkbox to have it checked/unchecked depending the collection.

 

I am 99% sure it is possible to do it, but I cannot find the right way how to write the formula.

 

I hope with my explenation, the problem is more clear now.

Thank you in advance fore your help !

Highlighted
Anonymous
Not applicable

Re: Checkbox default property set from multicolumns collection

Hi @MJKjoachim thank you for your post and sorry to hear you're experiencing these difficulties. 

 

@Drrickryp thank you for your initial response. Could you review the new information provided?

 

@Anonymous

Highlighted
Super User III
Super User III

Re: Checkbox default property set from multicolumns collection

Hi @MJKjoachim,

I'm not clear on what exactly happens after you check the boxes but it should be possible to use the Set() function to create a global variable that depends upon a selection in the Collection when you Navigate back to the original screen. IE. 

Back(); If(SomeCondition=true, Set(gvar, true), Set(gvar, false)

and make toggle's Default property:  gvar

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Checkbox default property set from multicolumns collection

Thanks for your help with this thread @Drrickryp@MJKjoachim can you advise if you have solved your problem?

 

@Anonymous

Highlighted
Advocate II
Advocate II

Re: Checkbox default property set from multicolumns collection

Hello everyone,

 

I apoligize for my late answer, the start of this year is quite tough at the office !

 

First, thank you for your help.

I knew already about the set function, it can help in this case.

 

By the way, in the meantime, I changed a little bit the design of my "filter screen" in order user could select different filter type (i.e. country, type, name...) so I had to adapt (and I am still modifiying) the code.

 

If I still need help when my code will be more finished, I will post a new message in this thread.

 

Thank you again and have a nice day !

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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