HR Tasks - variables are not populated in the portal, but are populated inside hr task record

Andr_1
Tera Contributor

Hi.

 

I have a flow with an action to create an HR task and send that HR task to someone to be visible in the portal. The objective is for the user to access the portal and send some variables with information. Some of these variables must already be populated and read-only, so this user cannot change these variables.

Andr_1_0-1721059793422.png


The task is created, associated to a hr case and it will appear on the portal for the user.

Andr_1_1-1721059865432.png


Now, the problem is that on the portal, the autopopulated variables (first screen shoot) are not appearing with the values

Andr_1_2-1721059983837.png
But if we look into the backend...

Andr_1_4-1721060172972.png

 

...the variables are populated with the information provided on the flow.


How can I show also the variables populated on the portal?

 

Thank you

André Ramos

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Andr_1 Usually the variable and their values are stored in question_answer table for record producers, you need to write an onLoad client script and a script include to make a query to this table via a GlideAjax call. Once the values are received in the call back, you can set the field values using g_form.setValue() method.

View solution in original post

6 REPLIES 6

@Andr_1 This approach only works if the user is accessing the task from hrm_to_dos page. This approach will not work if the user goes to the task from the My Task section on the esc portal. The sys_id is absent in the url in such case.

@Sandeep Rajput yes the user will only access the task from hrm_to_dos page so for me, it will work