Walk relationships and show with summation
Hi I have an application "Organizations".I have a "Contacts" application. An organization has 5 contacts, and I want to show in a calculation field, only the contacts that belong to the Management Department (this is a category field and would be only 3 of them). And also to be able to make a sum of the field "Years" of those 3 items that belong to address. This is possible?

  • Hi Jose, var contacts = @All of contact app name field;var categories = @All of contact app category field,var years = @All of years;var names = [];var sum = 0;for(var i = 0; i < contacts.length; i++){      if(categories[i] == "Management Department"){         names.push(contacts[i]);          sum += Number(years[i]) || 0;    }}; names.join() returns the names, sum returns the sum of the years.  Rainer
This question is closed.