Hi Experts!
I am trying to run a SQL Update Statement via Client Script in FSM Mobile.
I am adding a Client Script to a Control Event. This Client script will run the SQL Client Script via ‘ExecuteScript’ function.
Client Script Code:
var parentTaskId = getCurrentKeys("task","task_id");
var bookingRequestId = getDBValue(stringFormat("SELECT user_def24 from task where task_id ='{0}'",parentTaskId));
var custSig = getDBValue(stringFormat("SELECT user_def_num1 from task where task_id = '{0}'",parentTaskId));
var custSigName = getDBValue(stringFormat("SELECT user_def5 from task where task_id ='{0}'",parentTaskId));
var custNRIC = getDBValue(stringFormat("SELECT user_def4 from task where task_id ='{0}'",parentTaskId));
executeScript("C_BOOKING_CS_VALD_NEXT_SQL",_custNRIC,custSigName,bookingRequestId]);
SQL Client Script Code:
UPDATE task
SET user_def4 = '{0}', user_def5 ='{1}'
WHERE user_def24 ='{2}'
Currently I am getting an error when i run the script in mobile, the Executescript line contains wrong syntax.
How do I add the pulled values for the SQL client script to pull?