- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 07:44 AM
I have a script which I know returns true but the field remains hidden. Why?
Here is the script:
Solved! Go to Solution.
- Labels:
-
Security Operations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 09:46 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 10:16 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 10:22 AM
ok, trimming helped it go to that if statement but still the field is hidden.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 10:27 AM
Do you have any other ACLs on this field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 10:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 10:32 AM
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?