cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RBMN187
Frequent Visitor

Coloring gallery when I click on different fields

Hello everyone,

I am building a calendar app where users can click on a date (not a picker) and then select the color of for morning shift, late shift if they are free etc.

The problem that I have is that when date is selected and the color is applied it stays there for each field no matter what month I switch to.

TemplateFill that I got on the gallery;
If(ThisItem.IsSelected && Morning.Value=true ,Green,Late.Value=true,Red,Free.Value=true,Yellow, RGBA(0, 0, 0, 0))

I tried different variations with Rectangles inside of the gallery etc. but the problem persists.

Is there any way to mark different fields inside of a gallery with colors so that they do not repeat themselves when switching to another view of the gallery?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Nogueira1306
Super User
Super User

Okay, check this 2 videos from shane young. I made an app that has a callenda rfollowing this videos and I have the  "Today()" with a differente collor. It might help you on your case.

https://www.youtube.com/watch?v=SlfnhQgMXrY 

https://www.youtube.com/watch?v=8qqEfzdVM0Y&t=817s 

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

 

View solution in original post

WarrenBelz
Super User
Super User

Hi @RBMN187 ,

You have not stated where Morning.Value, Late.Value and Free.Value come from, but I am assuming they are yes/no fields in the gallery? If so and you want the colour to change based on these fields when the item is selected

If(
   ThisItem.IsSelected,
   If(
      ThisItem.Morning.Value,
      Green,
      ThisItem.Late.Value,
      Red, 
      ThisItem.Free.Value,
      Yellow, 
      Transparent
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
Nogueira1306
Super User
Super User

Okay, check this 2 videos from shane young. I made an app that has a callenda rfollowing this videos and I have the  "Today()" with a differente collor. It might help you on your case.

https://www.youtube.com/watch?v=SlfnhQgMXrY 

https://www.youtube.com/watch?v=8qqEfzdVM0Y&t=817s 

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

 

WarrenBelz
Super User
Super User

Hi @RBMN187 ,

You have not stated where Morning.Value, Late.Value and Free.Value come from, but I am assuming they are yes/no fields in the gallery? If so and you want the colour to change based on these fields when the item is selected

If(
   ThisItem.IsSelected,
   If(
      ThisItem.Morning.Value,
      Green,
      ThisItem.Late.Value,
      Red, 
      ThisItem.Free.Value,
      Yellow, 
      Transparent
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Sohil_kazi
Advocate I
Advocate I

Hello 

you can also try this one, Fill color on a selected row in Gallery.

 

If (ThisItem.IsSelected,RGBA(216,213,240,1),RGBA(217, 223, 240, 1))

 

Thank You

Please click Accept as Solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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