bv_api.selectValue does not work when using extra arguments

Posted by Rollbase User on 28-Jun-2012 09:39

Hi, Im trying to populate a field automatically in the grid using the grid control. It looks like the function rbv_api.selectValue doesn't accept arguments in the grid control. Without argument, i get the right value in the field, see examples below: This does not work: script> function rbf_showGridRow(rowIndex) { var obj_id = 'Myvalue'; rbf_setGridContent2(0, 'testfield', rowIndex, #EVAL[rbv_api.selectValue("SELECT mycolumn FROM mytable where name=?", obj_id)]); } /script> This works: script> function rbf_showGridRow(rowIndex) { var obj_id = 'Myvalue'; rbf_setGridContent2(0, 'testfield', rowIndex, #EVAL[rbv_api.selectValue("SELECT mycolumn FROM mytable where name='Myvalue'")]); } /script> Can you please take a look and let me know your thoughts? Thanks in advance! Rgrds, Bakar

All Replies

Posted by Admin on 28-Jun-2012 16:27

You're mixing server-side and client-side API. In first case obj_id is unknown when page is rendered, so #EVAL[] cannot bring up meaningful results.



Please use client-side API only.

Posted by Admin on 29-Jun-2012 12:27

marking as solved: server-side API cannot be used on client-side

This thread is closed