cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Alternate color on gallery Items

Hi,

Please suggest, I have attached the screenshot of the gallery I am using.

How shall I achieve this: fill alternate colors to the gallery items ?

Anyhelp would be appreciated. Thanking you!

 

Regards, Nandan

3 REPLIES 3
KrishnaV
Community Champion
Community Champion

Hi @Anonymous ,

 

In PowerApps Gallery has a property called templateFill and that will be applicable for all the items in the Gallery however how you achieve this is:

  1. Add a label and associate it with the item ID
  2. Add a rectangle in the gallery item
  3. For the fill property of the rectangle add the below formula

 

If (Mod(Value(lblItemID.Text),2) =0, RGBA(125,125,125,80),RGBA(105,105,105,80))​

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Anonymous
Not applicable

The same code on fill property gives an error : Unexpected character, the character are used in the formula in an unexpected manner.

Could you suggest ? screenshot attached

Hi @Anonymous ,

 

You need to set it to TemplateFill color see the below:

KrishnaV_0-1594735613675.png


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,482)