object script update records in client side

Posted by Rollbase User on 05-Sep-2010 22:23

Does object script have a counterpart on the client side? I need to update a value when a certain event is encountered. For example I have a link that when I click it, it calls an api method similar to rbv_api.updateRecord to update my field.

All Replies

Posted by Admin on 05-Sep-2010 23:38

You can send AJAX from client to requests to retrieve/update records. Please check Chapter 7 for details.

Posted by Admin on 06-Sep-2010 02:34

Thanks but this does not solve the problem.

I am on the view page. I have template field that when clicked needs to update the number of clicks counter. When I click the field, I am able to change the value of the number of clicks, but when I refresh the page or go another tab and return to it, the value of the number of clicks is no longer correct (return to 0).

Posted by Admin on 06-Sep-2010 02:40

Should rbf_setFieldContent() be able to save the value on the server? As of the moment, it just changes the display but not the server value.

Posted by Admin on 06-Sep-2010 08:45

I also tried rbf_setField but it still does not update my click count.

Posted by Admin on 06-Sep-2010 11:14

I think rbf_setFieldContent only sets value on current page. We can enhance this to also set value o server side. As for rbf_setField it should change server-side value. I'll check how it works.

Posted by Admin on 06-Sep-2010 20:23

Hi Pavel,

I get the error useIds is not defined when using the rbf_setField. This is when the field I am updating is a text field. From chapter 7, I understand that this parameter is not needed when the field is a text field. Attached is a copy of the error I get.

Posted by Admin on 07-Sep-2010 10:20

I confirm the bug, will be fixed in the next update.

This thread is closed