Skip to main content
Solved

FSM Mobile - data reflection in back office


Forum|alt.badge.img+6

hi can anyone tell how to reflect the data to smart client or back office .

i am wrote a script for mobile using the

 setdbvalue(stringformat(“update person set user_def12=’{0}’ where peron_id =’{1}’”,y,personid));

here y and personid is parameters that i am passing .

the script executes but the data is not reflected in back office or smart client  , so anyone tell me how this can be archived .

thanks in advance .

Best answer by Chandima Athukorala

Muthu, as a developer first you need to find which row that give thia error and correct  it for syntax. If I test  something  best way to put alert msg  after each line and check which line has issue. Do it that way find this erroneous  syntax.  One final hint , to eliminate syntax errors you should first check this using Run button in Client Script Window.(then  you can easily identify syntax errors! )

View original
Did this topic help you find an answer to your question?

5 replies

Chandima Athukorala
Hero (Employee)
Forum|alt.badge.img+6

If you need to reflect changes to back office  from the mobile you should  use to  saveDataTransaction function to do so. In script  documentation , you would see “Example 10—Script-Based Transaction” which may help you on your request.


Forum|alt.badge.img+6

thanks for your response , can you  share the script document .


Chandima Athukorala
Hero (Employee)
Forum|alt.badge.img+6

you can  open documentation when you go to custom script window under smart client.  Click ok help icon on top right corner with sign (?). Then it should open up Script documentation.


Forum|alt.badge.img+6

can u tell me , what is the error “incorrect datatype” for .

here is the code 

var personId = getUserInfo("PersonID");
var Y = 'Y';

var rowId = getDBValue(stringFormat("select metrix_row_id from person where person_id = ''",personId ));
var taskTrans = generateDataTransaction("person", "UPDATE", stringFormat("metrix_row_id = ", rowId));
taskTrans = addToDataTransaction(taskTrans, "metrix_row_id", rowId);
taskTrans = addToDataTransaction(taskTrans, "person_id", personId);
taskTrans = addToDataTransaction(taskTrans, "user_def11", Y);


saveDataTransaction(taskTrans, getMessage("person", "LABEL"));

 

 


Chandima Athukorala
Hero (Employee)
Forum|alt.badge.img+6

Muthu, as a developer first you need to find which row that give thia error and correct  it for syntax. If I test  something  best way to put alert msg  after each line and check which line has issue. Do it that way find this erroneous  syntax.  One final hint , to eliminate syntax errors you should first check this using Run button in Client Script Window.(then  you can easily identify syntax errors! )


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings