1

I am using SharePoint 2013.

Would you please give me a direction through which way I can accomplish this ?

I have a list where I have a date field (let it be FinishedDate) with different dates.

Depending on a date I would like to give them a status/or colorize a row but it should comparing with others FinishedDates from other rows.

for example:

  1. ID: 1; FinishedDate: 2019/06/08/August;
  2. ID: 2; FinishedDate: 2019/06/02/February;
  3. ID: 3; FinishedDate: 2020/02/02/February;

For ID:2; it should be giving color green or status 'Done'.

For ID:1; it should be giving color grey or status 'SoonToDo'.

For ID:3; it should be giving color brown or status 'UhaveTime'.

Thanks.

  • Do you want to compare this dates with today's date? Check my answer given here. if you can do something similar like given here. – Ganesh Sanap Aug 6 '19 at 7:33
  • No, with others FinishedDates in others rows – white fang Aug 6 '19 at 7:37
  • If there are more than 1000 items then how can I know from which list items I should compare the FinishedDates?? There should be something Unique in these list items. – Ganesh Sanap Aug 6 '19 at 7:40
  • With last one max(FinishedDate) – white fang Aug 6 '19 at 7:51
1

You would not not be able to do it using any OOTB solution, customization would be required. Here is high level approach.

  • Create a Page, get data from SharePoint List using JSOM/REST API. Display data using Custom html or use jquery data table.
  • Loop through each item to create custom json object. While looping through add two attribute to json 1. Status and 2. CSS class. Compare your current row date with other row date(by using index of previous item or any other column), Based on comparisoin set the value of status and css class
  • Assign the css class in html table row or in jqery data table row.

Edit

Link to populate jquery datatable - https://www.c-sharpcorner.com/article/using-jquery-datatable-to-display-sharepoint-list-data-on-share/

Here before you assign json object to like below. you have to iterate and form custom json object.

 "aaData": data.d.results,    
  • Hi, do u have links/tutorials where it might be done in some same way ? – white fang Aug 6 '19 at 7:53
  • Through Sharepoint Designer something like that possible or only left the choice that you've described upper ? – white fang Aug 6 '19 at 10:49
  • no possible with designer also.... – Siddharth Vaghasia Aug 6 '19 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.