Guest User

Untitled

a guest
Nov 28th, 2019
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function calculateAgreement(currentState, agreementData) {
  2.     if(currentState == 5){
  3.         var x = Number(hAPI.getCardValue("row_gerentes"));
  4.         for (var i = 1; i <=x; i++) {
  5.             var funcao = hAPI.getCardValue("respEscolhido___"+i);
  6.             var user = hAPI.getCardValue("aprov_ger_hid___"+i);
  7.             if((user != null && user != "") && funcao == "Diretor"){
  8.                 agreementData.put(user);
  9.             }
  10.         }
  11.     }
  12.     agreementData.put("currentPercentage", 100);
  13. }
RAW Paste Data