On 07/16/2012 05:26 PM, lvaradha wrote:
>
> User Application 4.0.1
>
> EmployeeStatus| String | Static list
>
>
> In the Form field "EmployeeStatus" i have a static list (Active,
> InActive) values for employeestatus attribute.
>
>
> when i select the user in UserName field it should get the
> employeeStatus value.
>
> Below is my code
>
> try
> {
>
> dn=form.getValue("UserName").toString;
> var av = IDVault.get( null, dn, "user", "employeeStatus");
> field.select(av)
> }
> catch(e)
> {
> alert( "Error"+e );
> }
>
> got the below error.
>
> ErrorExpected string value for parameter ''dn'' of function
> ''idvault.get()''.
>
>
> When i tried with the below hard coded value it works fine.
>
> try
> {
> var av = IDVault.get( null,
> "cn=lkumar_na,ou=NA,ou=Internal,ou=users,o=havigs" , "user",
> "employeeStatus");
> field.select(av)
> }
> catch(e)
> {
> alert( "Error"+e );
> }
>
> I followed this posting as well but din't help
> http://forums.novell.com/netiq/netiq...cma-error.html
>
>
> Any idea why this is behaving like this?
>
>

Greetings,

1) I hope that it was a copy/past issue that () is missing from the end
of .toString if not then it needs to be:
dn=form.getValue("UserName").toString();

2) I also hope that you have confirm the actual field name is UserName
as compared to the Display Name of the Field.

3) My favorite way to debug situations like this is to utilize
form.alert();

So, in your code I would do the following:

dn=form.getValue("UserName").toString();
form.alert("The value of UserName is: " + UserName);
var av = IDVault.get( null, dn, "user", "employeeStatus");
field.select(av)
}





--
Sincerely,
Steven Williams
Lead Software Engineer
NetIQ