cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Foxzor
Helper II
Helper II

Due date and status check (at once)

Hello Experts!

 

I have a rectangle what I would like to color based on the following:

 

If the relevant sharepoint item in a list created date has been expired compare to the actual date AND its status is not equal with "Finished" fill with RED color else White color. I was able to write the code for due date below:

 

DateDiff(ThisItem.'Due date', Today()) >= 1,RGBA(241, 130, 141,1),RGBA(0, 0, 0,0)

 

but I am not able to extend the code with status check above.

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Foxzor
Helper II
Helper II

Finally!

 

If(DateDiff(ThisItem.'Due date', Today()) >= 1 And "In-Progress" in ThisItem.Status.Value Or "Open" in ThisItem.Status.Value,
RGBA(241, 130, 141,1),RGBA(0, 0, 0,0))

 

This is what I need and what is fulfill my expectations.

 

Thank you @eka24  You are the best!

View solution in original post

8 REPLIES 8
eka24
Super User III
Super User III

if the status column is a choice type try

DateDiff(ThisItem.'Due date', Today()) >= 1 && StatusColumn.Value<>"Finished",RGBA(241, 130, 141,1),RGBA(0, 0, 0,0)

 

Otherwise use:

DateDiff(ThisItem.'Due date', Today()) >= 1 && StatusColumn<>"Finished",RGBA(241, 130, 141,1),RGBA(0, 0, 0,0)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thank you, but I have tried this solution already:

DateDiff(ThisItem.'Due date', Today()) >= 1 && ThisItem.Status.Value<>"Finished",RGBA(241, 130, 141,1),RGBA(0, 0, 0,0)

 

And I receive a failure message: Attached

 

eka24
Super User III
Super User III

Is the formula in a Gallery?

If(DateDiff(ThisItem.'Due date', Today()) >= 1 && ThisItem.Status.Value<>"Finished"),
RGBA(241, 130, 141,1),RGBA(0, 0, 0,0)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Yeah, sorry . I forgot to mentioned. The rectangle is in a gallery. Tried the code what you provided. Attached the output of it.,

eka24
Super User III
Super User III

I tested this:
If
(DateDiff(ThisItem.'Due date', Today()) >= 1 && "Finished" in Concat(ThisItem.Status.Value, Value, ", "),
RGBA(241, 130, 141,1),RGBA(0, 0, 0,0))
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Foxzor
Helper II
Helper II

Thank you for your support but still the code is not working at my side...:(

Foxzor
Helper II
Helper II

Finally!

 

If(DateDiff(ThisItem.'Due date', Today()) >= 1 And "In-Progress" in ThisItem.Status.Value Or "Open" in ThisItem.Status.Value,
RGBA(241, 130, 141,1),RGBA(0, 0, 0,0))

 

This is what I need and what is fulfill my expectations.

 

Thank you @eka24  You are the best!

View solution in original post

eka24
Super User III
Super User III

Can you show the data type in the Sharepoint list?

 

Capture.JPG

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (46,199)