Symantec IGA

Expand all | Collapse all

[IM] How to modify value of others fields in the validation javascript method

  • 1.  [IM] How to modify value of others fields in the validation javascript method

    Posted Dec 22, 2016 05:46 AM

    Hi,

     

    I have a basic admin task with two text fields:

     

    |site1|: is a screen logical attribute.

    Application1: is a text field with "Validate on change" checked, and on my Validation JavaScript i call a static java method

     

    my validation method

    I want to change the value of the attribute |site1| after each modification of the field application1, for the moment i want just fill the field |site1| with the string "test".  The function setFieldValue is executed after each modification but the value of the field |site1| still empty.

    Can you please explain me how to modify value of others fields in the validation javascript method

     

    Kind regards.



  • 2.  Re: [IM] How to modify value of others fields in the validation javascript method

    Broadcom Employee
    Posted Dec 30, 2016 05:14 AM

    Instead of c.setFieldValue ("|site1|", "test"), use this line: ctx.setFieldValue ("|site1|", "test"). Use FieldContext, don't typecast.

     

    Alternatively, you can also move validate method from attribute level to screen level.

     

    Regards,

    Sumeet