cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

Conditional formatting on List screen and details form

Hello,

 

I have list screen, details & edit screen. For details & edit - I am using Edit & Display forms. Data I am showing has date field and if this date field value is 7 days less than current then want to apply some formatting to detail screen.

 

e.g. While loading list screen - if any of record date field value & current date difference is 7 days then want to show that record in red. Similarly when i navigate to Details screen - then date field data card color should be different & will also enable one button which is by default disable.

 

I have added below code to onVisible event of details screen but its not working

If(DateDiff(BrowseGallery3_2.Selected.'Expiry Date', Today()) = 7,'Expiry Date_DataCard1'.BorderColor=Red,btnBGCReminder.Visible=true)

 

Appreciate your help here.

 

Thanks,

Vivek

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @vmn ,

On BorderColor of 'Expiry Date_DataCard1'

If(
   DateDiff(
      BrowseGallery3_2.Selected.'Expiry Date', 
      Today()
   ) = 7,
   Red,
   Whatever it is now
)

 

On Visible of btnBGCReminder

DateDiff(
   BrowseGallery3_2.Selected.'Expiry Date', 
   Today()
) = 7

 

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

4 REPLIES 4
Super User III
Super User III

Hi @vmn ,

On BorderColor of 'Expiry Date_DataCard1'

If(
   DateDiff(
      BrowseGallery3_2.Selected.'Expiry Date', 
      Today()
   ) = 7,
   Red,
   Whatever it is now
)

 

On Visible of btnBGCReminder

DateDiff(
   BrowseGallery3_2.Selected.'Expiry Date', 
   Today()
) = 7

 

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

Thanks @WarrenBelz ,

Button is working however On BorderColor of 'Expiry Date_DataCard1'  isnt.

If(
   DateDiff(
      BrowseGallery3_2.Selected.'Expiry Date', 
      Today()
   ) = 7,
   Red,
   RGBA(0, 18, 107, 1)
)

Is it the case that some features didnt work as expected preview mode? 

Well, figured it out. We need to make below change to make it work.

 

Set Expiry Date_DataCard1 display mode to DisplayMode.Edit. Earlier it was read only.

Thanks @WarrenBelz for the help.

@vmn ,

You can also shortcut this a bit on this BorderColor

If(
   btnBGCReminder.Visible,
   Red,
   RGBA(0, 18, 107, 1)
)

 

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (87,237)