Calculation for @all of + all referenced apps
Running into a jam. Trying to figure out the calculation of the following situation: I have one calculation field that I'm trying to get a calculation of 6 referenced apps. Trying to count all items in each referenced app that have a year of 2017-2018. This is what I have so far, but I can't figure out what I'm missing... var status = @All of School Year var status1 = @All of School Year var status2 = @All of School Year var status3 = @All of School Year var status4 = @All of School Year var status5 = @All of School Year var status6 = @All of School Year var count = 0 for(i=0; i<status.length; i++) for(b=0; b<status1.length; b++) for(c=0; c<status2.length; c++) for(d=0; d<status3.length; d++) for(e=0; e<status4.length; e++) for(f=0; f<status5.length; f++) for(g=0; g<status6.length; g++) {(status[i] == "2017-2018" || status2[c] == "2017-2018" || status3[d] == "2017-2018" || status4[e] == "2017-2018" || status5[f] == "2017-2018" || status6[g] == "2017-2018") ? count++ : null} count

  • var status1 = @All of School Year;var status2 = @All of School Year;var status3 = @All of School Year;var status4 = @All of School Year;var status5 = @All of School Year;var status6 = @All of School Year,var statusALL = status1.concat(status2,status3,status4,status5,status6);var count = 0;for(var i = 0; i < statusALL.length; i++){if(statusALL[i] == "2017-18"){count += 1}};count That should work if the status field in the 6 other apps is a single choice field. If it is multiple choice modify the var statusALL: var statusALL = status1.concat(status2,status3,status4,status5,status6).join().split(",") Rainer
  • Yeah, was trying to get all a calculation to sum up all trainings from the referenced apps for 2017-2018.
  • Hi Anthony, as the result: do you want one number (= sum of all 2017-18 of all 6 related apps) or a list likeApp 1: 50App 2: 100...? Rainer
This question is closed.