Solved

FSM - Field values in custom debrief screens


Userlevel 2
Badge +5

Hello all!! 

Regarding the workflow, when we assign a task in the technician in the back office, in the DebriefOverview (OOTB screen) the ‘task_type’ field is shown with its value. (as shown below)
But in the custom screen DebriefRPMInterface the task type value is not shown. The properties of the task_type are the same in both screens. We know that we should create a script for the ‘where clause’ section in order to sync the screens with the task id, but we are not sure about the exactly script structure. 

 

Thank you in advance! 


   

icon

Best answer by Anjula Priyanath 19 May 2022, 14:22

View original

4 replies

Userlevel 6
Badge +14

Hi @ioannamourtzaki,

Can you confirm that you are getting the correct value for this task_type field by changing the Control Type into Text(instead of List) in customer screen?

As my understand, if you don’t have the value for task_type field, you need to write a refresh script to set the correct value for this field.

Ex - 

var taskId = getCurrentKeys("task", "task_id");

var taskType;
taskType = getDBValue(stringFormat("select task_type from task where task_id = '{0}'", taskId));

if(isNullOrEmptyString(taskType) == false){
    setControlValue("task", "task_type", taskType);
}

Userlevel 6
Badge +14

Hi @ioannamourtzaki,

Can you confirm that you are getting the correct value for this task_type field by changing the Control Type into Text(instead of List) in customer screen?

As my understand, if you don’t have the value for task_type field, you need to write a refresh script to set the correct value for this field.

Ex - 

var taskId = getCurrentKeys("task", "task_id");

var taskType;
taskType = getDBValue(stringFormat("select task_type from task where task_id = '{0}'", taskId));

if(isNullOrEmptyString(taskType) == false){
    setControlValue("task", "task_type", taskType);
}

@ioannamourtzaki,

your field properties are correct. So, please do as below.

Client script & Mobile Design screen property

 

Userlevel 2
Badge +5

Thank you very much @Anjula Priyanath !!! 

This works and task_type is shown! 

So we have to do the same for all the fields in the debrief screens, right ? There is no way to automatically get the values with ‘where clause’ scripts (using task_id)?

Userlevel 6
Badge +14

Thank you very much @Anjula Priyanath !!! 

This works and task_type is shown! 

So we have to do the same for all the fields in the debrief screens, right ? There is no way to automatically get the values with ‘where clause’ scripts (using task_id)?

No @ioannamourtzaki, we can do it.

If it’s a column in the primary table of screen, you can also easily use the where clause and modify only option in the screen properties. It depends. But, in your case, this should be the recommended way.

Where clause script & Screen properties

 

Reply