On 07/13/2012 11:06 AM, lvaradha wrote:
>
> Hi Wolfgang,
> Thanks for your reply. I tried your options but i am getting the
> below error. Any idea?
>
> //Code: In ADGroupList field on event property //adgrpsearch
> var value1=form.getValues("ADGroupList")
> IDVault.globalQuery("ADGroupList", "InternalResourceCustomQuery",
> {"internalad":form.getValue("ADGroupSearch")})
> field.setValues("ADGroupList", value1,value1,true)
> field.select(value1)
>
> While loading the workflow i got this error.
>
> Active Directory Applications: An error 'Function ''field.setValues()''
> expects a maximum of ''3'' parameters.' was encountered while executing
> the script 'var value1=form.getValues("ADGroupList")
> IDVault.globalQuery("ADGroupList", "InternalResourceCustomQuery",
> {"internalad":form.getValue("ADGroupSearch")})
> field.setValues("ADGroupList", value1,value1,true) field.select(value1)
> '
> Active Directory Applications: An error 'Function ''field.setValues()''
> expects a maximum of ''3'' parameters.' was encountered while executing
> the script 'var value1=form.getValues("ADGroupList")
> IDVault.globalQuery("ADGroupList", "InternalResourceCustomQuery",
> {"internalad":form.getValue("ADGroupSearch")})
> field.setValues("ADGroupList", value1,value1,true) field.select(value1)
> '
> Search: An error 'Function ''field.setValues()'' expects a maximum of
> ''3'' parameters.' was encountered while executing the script
> 'field.fireEvent("adgrpsearch")'
> Search: An error 'Function ''field.setValues()'' expects a maximum of
> ''3'' parameters.' was encountered while executing the script
> 'field.fireEvent("adgrpsearch")'
> Unrecoverable error during asynchronous call
>
>
> So i changed the field.setValues to field.setValues("ADGroupList",
> value1,true)
>
>
> Now got different error when i performed the below activity
> 1) click on the workflow
> 2) In ADGroupList selected "SSL-Service-OWA" group to RIGHT Side of the
> Pick list ( Note: i did onload event to populate these value for ontime)
> 3) Then i searched for string in ADGroupSearch field and press tab
> which throwed the below error.
>
>
>
> Active Directory Applications: An error '''field.select()'': value(s)
> ''cn=SSL-Service-OWA,cn=ResourceDefs,cn=RoleConfig,cn=AppConfig,cn= UserApplication,cn=idv-DriverSet,ou=IDM,ou=Services,o=idv''
> not found in the list items.' was encountered while executing the script
> 'var value1=form.getValues("ADGroupList")
> IDVault.globalQuery("ADGroupList", "InternalResourceCustomQuery",
> {"internalad":form.getValue("ADGroupSearch")})
> field.setValues("ADGroupList", value1,true) field.select(value1) '
> Active Directory Applications: An error '''field.select()'': value(s)
> ''cn=SSL-Service-OWA,cn=ResourceDefs,cn=RoleConfig,cn=AppConfig,cn= UserApplication,cn=idv-DriverSet,ou=IDM,ou=Services,o=idv''
> not found in the list items.' was encountered while executing the script
> 'var value1=form.getValues("ADGroupList")
> IDVault.globalQuery("ADGroupList", "InternalResourceCustomQuery",
> {"internalad":form.getValue("ADGroupSearch")})
> field.setValues("ADGroupList", value1,true) field.select(value1) '
> Search: An error '''field.select()'': value(s)
> ''cn=SSL-Service-OWA,cn=ResourceDefs,cn=RoleConfig,cn=AppConfig,cn= UserApplication,cn=idv-DriverSet,ou=IDM,ou=Services,o=idv''
> not found in the list items.' was encountered while executing the script
> 'field.fireEvent("adgrpsearch")'
> Search: An error '''field.select()'': value(s)
> ''cn=SSL-Service-OWA,cn=ResourceDefs,cn=RoleConfig,cn=AppConfig,cn= UserApplication,cn=idv-DriverSet,ou=IDM,ou=Services,o=idv''
> not found in the list items.' was encountered while executing the script
> 'field.fireEvent("adgrpsearch")'
>
>

Greetings,
The error is expected and you could see that if you utilized the
Expression Builder.

field.setValues can take 1, 2, or up to 3 parameters:
field.setValues(data-value[s])
field.setValues(data-value[s], data-value[s])
field.setValues(data-value[s], data-value[s], keep-old-values)

Where as form.setValues can take 2, 3 or up to 4 parameters:
form.setValues("fieldname", data-value[s])
form.setValues("fieldname", data-value[s], data-value[s])
form.setValues("fieldname", data-value[s], data-value[s], keep-old-values)


When you are using field.setValues you do not specify the field, because
it has to be run in that field's event (onchange, onload, onclick, ...etc)

--
Sincerely,
Steven Williams
Lead Software Engineer
NetIQ