Am trying to pass the values from catalog item to Service Portal server side script

Community Alums
Not applicable

Hi All,

Am trying to pass the current values from catalog item to sp server side script. And its not working..

Catalog item form:

JPRamyaPriya_0-1672913973488.png

Client script : On submit

JPRamyaPriya_1-1672914171749.png

Widget code:

JPRamyaPriya_3-1672914401919.png

 

Can anyone guide me in here.

Any help is appreciated!

@Raghav Sharma , -- Please suggest on this.

 

Thanks in advance!!

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Thanks Raghav, we changed the requirement.

View solution in original post

7 REPLIES 7

RaghavSh
Kilo Patron

try below:

$scope.page.g_form.getValue('var_name'); 

If you are able to get the variable value with this code, then you can pass it from server to client using c.server.update() and get it through input.var_name;

 

Also pass  $scope as parameter  in you 1st line client script function.


Raghav
MVP 2023

Community Alums
Not applicable

Thank you Raghav!

I have used in the client side , but value is not coming into the alert:

JPRamyaPriya_0-1672927600635.png

 

@Community Alums it should be before c.server.update() maybe in line no.6

This was a working code and has been used many times.


Raghav
MVP 2023

Community Alums
Not applicable

Tried that as well, that also not working..

JPRamyaPriya_0-1672930924398.png