Updating Calculation field only once a different Category field has been selected
I am hoping someone can help me with some JavaScript? I have created 2 apps, an 'Annual Leave Request' app and a 'Annual Leave Tracker' app (per individual per calendar year). I have a Category field in the Request app where the Line Manager needs to 'Approve' or 'Decline' the Annual Leave request from an individual. I only want the Annual Leave Request to be added and tracked in the individuals Annual Leave Tracker when 'Approved' is selected in the Category field for this request. Can someone help me with this JavaScript for this? Many Thanks in advance!

  • Hi Murray, I assume that there is a relationship field in the Request-App to the Tracker-App, where the requesting individual selects his entry. For this setup, this should work: var catAppr = @all of YourCategoryFieldinRequest; var days = @all of YourFieldWithLeaveDayNumber; var total = 0; for(var i = 0; i < catAppr.length; i++){ if(catAppr[i] == 'Approved'){ total += days[i] } }; total Rainer rg@delos-consulting.com
This question is closed.