Question

I have a need to calculate working days until an item is due or working days past due. I also have to exclude holidays and the holidays may or may not apply to that item based on what project the holiday applies to. I had created a holiday calendar and initially created the field as a computed field that would display an empty div tag and I would use code to do the calculations and display it inside the div tag using javascript. This worked fine when the items were in a single list. Due to other requirements I needed to create a single list for each department. Now I still need to display this info but I am not sure how to do it.

So, can a custom field do this or is there some other way to display this data?

Was it helpful?

Solution

I believe that in a custom field, you will still be limited to CAML for your list displays. Therefore, if you need to display the working on the list views, you would back in the same boat of using javascript for all of your live data gathering. If you only need to display this information on the display pages, you could use a custom field and write code to calculate this information.

Another option (if you are not doing this already): You could create a web service to do the calculations. That way, you can (hopefully) cache your searches of the other lists and calculate all the data at once. Use the same computed field method and on return of the web service call, populate all the empty divs.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top