cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OlaH
Resolver I
Resolver I

Free weeks colored in a booking app

How do I compare rows and not columns?

I'm working on a booking app and want the background of the button to be green color for free weeks and red ones for booked.

 

In the first gallery the user first pick a box and then in a second gallery whom pick a week. The free weeks are green and the booked are red.

I've tried in Fill

"If(ThisItem.Veckonummer in bokning.vecka And varRecord.Title in bokning.Boxes; RGBA(220; 153; 153; 1);RGBA(209; 232; 178; 1))"
This one shows all the weeks booked regardlessly box. 
 
 How do I use IF to compare for a record?
 
Fill.png
1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi  @OlaH ,

 

In my understanding, to achieve your need, both validation conditions need to be met on the same record.

Please try this:

If(ThisItem.Veckonummer in bokning.vecka And varRecord.Title in Filter(bokning;vecka=ThisItem.Veckonummer).Boxes; RGBA(220; 153; 153; 1);RGBA(209; 232; 178; 1))

Hope this helps. If not, please share more details about the two validation conditions.

Sik

View solution in original post

2 REPLIES 2
v-siky-msft
Community Support
Community Support

Hi  @OlaH ,

 

In my understanding, to achieve your need, both validation conditions need to be met on the same record.

Please try this:

If(ThisItem.Veckonummer in bokning.vecka And varRecord.Title in Filter(bokning;vecka=ThisItem.Veckonummer).Boxes; RGBA(220; 153; 153; 1);RGBA(209; 232; 178; 1))

Hope this helps. If not, please share more details about the two validation conditions.

Sik

Thank you @v-siky-msft !

This works just as I want and now I learned how to use filter this way. 

Ola H

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,672)