Hello everyone,
I have the following problem in FSM Mobile: when using the function populateListFromQuery, the list is filtered as expected, but when saving the information, the field does not save the selected value. I imagine that when performing the filtering, it must be somehow setting it as empty.
Is there a solution for this?
Script:
var taskId = getCurrentKeys("task", "task_id");
setCurrentKeys("task", "task_id", taskId);
var tensao = getDBValue(stringFormat("select com_voltage from task where task_id ='{0}'",taskId));
if (tensao >= 4 || tensao <= 9){
var query = "select code_value, description from global_code_table where code_name = 'C_CELESC_LACRE_LOCALIZACAO' and user_def1 ='A'";
populateListFromQuery("c_task_lacres","c_localizacao_do_lacre",query,true);
} else if (tensao >= 1 || tensao <= 3){
var query = "select code_value, description from global_code_table where code_name = 'C_CELESC_LACRE_LOCALIZACAO' and user_def1 ='B'";
populateListFromQuery("c_task_lacres","c_localizacao_do_lacre",query,true);
}