ACL Script Returns True but the field is still hidden

verdakosnett
Tera Expert

I have a script which I know returns true but the field remains hidden. Why?

Here is the script:

find_real_file.png

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

yes answer variable should be set to true or false.And comming to passing current parameter is not required. Did you copy my script as is and tested it?


View solution in original post

33 REPLIES 33

no errors. the weird part is it doesn't return from here although this variable is fully populated and contains a user role.


if (typeof current.getValue('initial_letter_reviewers') != "undefined" && current.getValue('initial_letter_reviewers')!= null)


  {


    gs.info('yes, i am here');//never see this message


  var iii, sss,lllen;


  var initial_letter_reviewers= current.getValue('initial_letter_reviewers').toString().trim().split(',');


  lllen =initial_letter_reviewers.length;


  for (iii=0; iii<lllen; iii++) {



  if (gs.hasRole('x_64719_letters.'+initial_letter_reviewers[iii].toString()))


  { gs.info('ir role exists');


  return true;


  }


but goes down to the next and even then it still hides the comment_history field.


ok, trimming helped it go to that if statement but still the field is hidden.


Do you have any other ACLs on this field?


For this table there are three ACL's, all other fields are visible except for comment history. Should I delete the one with the *?


find_real_file.png


Nope, .* is a wild card ACL. it will take into effect when there is no matching field ACL. Can you make sure you are satisfying one of the table level ACL?