cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sal
Level: Powered On

Comparing Two Gallery Controls

I have two lists and I want to highlight the value in list1 based on list2 values where list1.name match with list2.name, both lists are generating using Gallery Control.

let say I have two lists with two columns as below

Llist1, with name1 and number1, and List2, with the name2 and number2.

 

Now I want to highlight the number1 in List1 where List1.name1 equals List2.name2. both lists dynamically loading values in Gallery Control.

I like to do something like this below where I can match the list1.name1 with list2.name2 and than compre there values and highlight but it's not working.

ForAll(List1,If(name1 in List2.name2,If(number1 < number2,Color.Yellow,RGBA(0,0,0,0)),RGBA(0,0,0,0)))

 

 

Thanks,

-Sal

2 ACCEPTED SOLUTIONS

Accepted Solutions
Mike8
Level 10

Re: Comparing Two Gallery Controls

Hello,

What you can also try is:
Gallery1.TemplateFill = LookUp(Gallery2.AllItems,name1=name2,Red)

It's just an example.
It turns Red the color of the template in Gallery 1 only when when name1=name2 as you can see. You can add more conditions and more colors.
If you need more help let me know.

View solution in original post

Highlighted
Mike8
Level 10

Re: Comparing Two Gallery Controls

Hello,

Great that you found your way. 🙂

Yes you can. You can move the value name1 in the Label control if it validates a condition. But you don't specify where is the Label control. Is it in Gallery2? If yes,
Gallery2.Label2.Text = If(LookUp(Gallery2.AllItems,name1=name2,true),name1,name2)
But you have a condition name1=name2,  name1 and name2 are the same and there no difference in the result. Just play with the expression above to accomplice what you need and if you need anything just give some extra info and I can help.

View solution in original post

5 REPLIES 5
Mike8
Level 10

Re: Comparing Two Gallery Controls

Hello,

What you can also try is:
Gallery1.TemplateFill = LookUp(Gallery2.AllItems,name1=name2,Red)

It's just an example.
It turns Red the color of the template in Gallery 1 only when when name1=name2 as you can see. You can add more conditions and more colors.
If you need more help let me know.

View solution in original post

Sal
Level: Powered On

Re: Comparing Two Gallery Controls

Thanks Mike, I try to add TemplateFill but it's not showing me that as an option with my Gallery Control. it's showing me TemplateHeight, Padding, Width etc.

 

 

 

 

Sal
Level: Powered On

Re: Comparing Two Gallery Controls

Thanks Mike, I just went over the Gallery Control properties and found TemplateFill, I added LookUp(Gallery2.AllItems,name1=name2,Red) and it worked.

 

Thanks,

-Sal

Sal
Level: Powered On

Re: Comparing Two Gallery Controls

Is  there anyway I can move the value in the Label control? lets say Gallery1.name1= Gallery2.name2, can I move the value name1 in to Label control if it validate the condition?

Highlighted
Mike8
Level 10

Re: Comparing Two Gallery Controls

Hello,

Great that you found your way. 🙂

Yes you can. You can move the value name1 in the Label control if it validates a condition. But you don't specify where is the Label control. Is it in Gallery2? If yes,
Gallery2.Label2.Text = If(LookUp(Gallery2.AllItems,name1=name2,true),name1,name2)
But you have a condition name1=name2,  name1 and name2 are the same and there no difference in the result. Just play with the expression above to accomplice what you need and if you need anything just give some extra info and I can help.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,484)