validation on Totals Row

Forums vLooup for SharePoint validation on Totals Row

Viewing 1 reply thread
  • Author
    Posts
    • #18820

      Hi,

      is it possible to add a code which shows me if the totals row is according to my rules or not? I do have a totals line and the value of it should not exceed the number 24 as it shows time sheets for every day.

      is it possible to add a validation string/code? if the value is higher it shows in red or whatever.

      thanks

    • #18867
      Alexander Bautz
      Keymaster

      This could have to be done with this code in Custom JS:

      setInterval(function(){
         	if(Number(jQuery(".vLookup_total_vLookupTasks:eq(8)").text()) > 24){
      		jQuery(".vLookup_total_vLookupTasks:eq(8)").addClass("vLookup-over24");
          }else{
      		jQuery(".vLookup_total_vLookupTasks:eq(8)").removeClass("vLookup-over24");
          }
      });

      and this in Custom CSS:

      .vLookup-over24{
          background-color:red;
          color:white;
      }

      Change “vLookupTasks” with the name of your field, and the number 8 with the index of the column from the left (the first one is index 0).

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.