cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Boolean Checkbox from DataTable Values

I have a data table that bring back data based on the date picker above the table.  Next to the data table is an Employees gallery.  Inside the gallery is a checkbox.  I need the checkbox to be true if the name is anywhere in the data table, not just the selected row.  Any help would be greatly appreicated.Capture

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Boolean Checkbox from DataTable Values

Hi @TerrificTerri 

 

Becasue of your checkbox in one Gallery control, I think you can try to change your formula expression as this:

CheckBox.Default=If(ThisItem.ColumnNameA in DataSourceName.ColumnB,true,false)  (DataSourceName is the DataTable's Items)

 

For example: I test as this:

Button4.OnSelect=ClearCollect(test2,{TechName:"AB",Name:"C"},{TechName:"AC",Name:"AB"},{TechName:"AB",Name:"B"},{TechName:"ABC",Name:"AC"},{TechName:"D",Name:"ABC"})

DataTable1.Items=test2

Gallery3.Items=test2

CheckBox.Default=If(ThisItem.Name in test2.TechName,true,false)

CheckBox.PNG

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

3 REPLIES 3
KroonOfficeSol
Level 10

Re: Boolean Checkbox from DataTable Values

Don't use the datatable control myself, but probably you can do it like this
Name in DataTable.AllItems.Name

Let me know this works.

Paul
Community Support Team
Community Support Team

Re: Boolean Checkbox from DataTable Values

Hi @TerrificTerri 

 

Becasue of your checkbox in one Gallery control, I think you can try to change your formula expression as this:

CheckBox.Default=If(ThisItem.ColumnNameA in DataSourceName.ColumnB,true,false)  (DataSourceName is the DataTable's Items)

 

For example: I test as this:

Button4.OnSelect=ClearCollect(test2,{TechName:"AB",Name:"C"},{TechName:"AC",Name:"AB"},{TechName:"AB",Name:"B"},{TechName:"ABC",Name:"AC"},{TechName:"D",Name:"ABC"})

DataTable1.Items=test2

Gallery3.Items=test2

CheckBox.Default=If(ThisItem.Name in test2.TechName,true,false)

CheckBox.PNG

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

Highlighted

Re: Boolean Checkbox from DataTable Values

I really like the idea of the collection.  This seams to be a much better approach to the answer.  Thank you both so much for your responses. v-yuxima-msft and KroonOfficeSol.  All you PowerApp people Rock!!!!!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 51 members 4,317 guests
Please welcome our newest community members: