Widget and Record Producer

david_legrand
Kilo Sage

Hi,

I would like to know if we have Documentation about Helsinki Service Portal limitations and best practices, specially when building Widgets for Record Producers?

For example, in the CMS, I was able to create a UI Page to have a "complex variable with dynamic number of rows", when we submit, the data are sent to a string field using a client script and in our Record Producer script, we were able to use this string field to create the corresponding records.

find_real_file.png

We are trying to build the same feature with Widget (as UI Pages don't display on Service Portal) but we don't succeed to retrieve the data when we submit the record producer.

I looked in Service Portal examples (HR...) but didn't see anywhere an example where data are retrieved from a Widget and used by a Record Producer script.

Apart these technical issues, the customer and us love the new Service Portal

cc: nathanfirth, ctomasi

cc:Developer Community

1 ACCEPTED SOLUTION

In record producers and catalog items you can also embed a Service Portal widget which could be used to accomplish the multiple rows as shown above.


View solution in original post

16 REPLIES 16

hanseriknielsen, if you have few minutes to explain, I'm still not sure if I fully understood personally


Hi David, I figured it out a way to set the value.



You can use


          $scope.page.field.value = VALUE



Also how are people handling when an item can be access from service portal or from within the backend ( service catalog or try it now button )? From what i can see widget are not supported within the backend.


Hello David,


I have to do exactly the same thing that you did (the same widget with add row and add row and I also need to retrieve the widget data) can you please share with me the full solution if you have it (the widget plus how you did to retrieve data)? I'm gonna be very thankful.


Hi David Legrand,



I also want to retrieve the widget data,


Is there any way to retrieve a widget data and create a new Record Producer based on that data.


If you have a solution please advice me to achieve this.




Regards,


Anna Silva.S.


In the widget controller you can create a "ng-change" event and add the data back into the variable manually.


$scope.change = function(){


        ....


        $scope.page.g_form.setValue("variable_name", "....some string....");


}