cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving an option setting?

ptc-953343
1-Newbie

retrieving an option setting?

In ACL I do this to get the user value set in change tracking:

$user = option("user")

I'm trying to get to the same value in Javascirpt, so I tried this:

var $user = Acl.eval(option("user"));

and then this:

var $user = Acl.execute(option("user"));


In both cases Java console shows

"ReferenceError "option" is not defined. Is there another way to get
to the options from Javascript?

thanks

..dan
3 REPLIES 3

Hi Dan--

You need some extra quotes there. The Acl.eval option expects a string argument, which it passes to the ACL interpreter. Try this:

var user = Acl.eval("option('user')")

Or, you just could use the standard Application.getOption(), like this:

var user = Application.getOption("user");

--Clay

Sorry, took a second look at the examples and I needed some
additional quotes, so this works:

var $user = Acl.eval("option('user')");

..dan

Thanks, just discovered the quote issue, thanks for the getOption lead.

..dan


Announcements