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
Community Champion
Community Champion

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
Community Champion
Community Champion

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

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_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,081)