Hi Facing issue on the onchange client script

rajeshKongamudi
Tera Contributor

Hi everyone,

 

We are facing issue on the on change client script, here based on the requested for variable we are auto populating the first, last, email for dropdown variable "type of access" is "adobe sign", but here that was not the case it is applying when we are going inside of type of access and changing the requested for then only it was appearing. we need to autopopulate when type of access is adobe sign and when the form loads if requested for is Rajesh kongamudi it should populate his first, last and email. Can anyone please help on this, thanks in advance.

 

1) Here the script which I'm using

rajeshKongamudi_3-1708907916759.png

 

2) Here it was not autopopulating

rajeshKongamudi_1-1708907672250.png

3) Here when we are going inside of type of access is adobe sign and changing the requested for then it is autopopulating the values

rajeshKongamudi_2-1708907847107.png

 

 

 

1 ACCEPTED SOLUTION

sasi_v
Tera Guru

Hi,

From what I understood your requirement is to populate first name, last name and email address based on 'Requested for' field when form is loaded  and also' On change' of Requested for variable.

 

If yes , then you need to comment or remove below part of code (from line 2 to 4) so that the client script works both ways(On Load and On change).

 

Code to removed or commented:

   if ( isLoading || newValue == '') {

      return;

          }

 

Thanks,

Sasikanth

View solution in original post

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hi,

You'd want to set this onChange client script to trigger on the variable that is the type of access field. Then, inside that, do your check to see if the access is adobe sign, then, if so, run your GlideAjax, etc.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

sasi_v
Tera Guru

Hi,

From what I understood your requirement is to populate first name, last name and email address based on 'Requested for' field when form is loaded  and also' On change' of Requested for variable.

 

If yes , then you need to comment or remove below part of code (from line 2 to 4) so that the client script works both ways(On Load and On change).

 

Code to removed or commented:

   if ( isLoading || newValue == '') {

      return;

          }

 

Thanks,

Sasikanth

Maddysunil
Kilo Sage

@rajeshKongamudi 

Please do this little modification in your code (line 2):

 

 if (newValue == '') {
      return;
       }

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks