[4.5] - Include variable in EVAL block - Forum - Rollbase - Progress Community

[4.5] - Include variable in EVAL block

 Forum

[4.5] - Include variable in EVAL block

This question is not answered

Hello,

Is there a way I can include a variable in an #EVAL block when using Browser-side API?

var str = "146201,146202";

  var returnVal = `#EVAL[var arr = rbv_api.selectQuery2('SELECT id, name, taskSubject, taskType#value, taskCategory#value, dueDate FROM ap_task WHERE id IN(?) ORDER BY dueDate ASC', 0, 10, '"` + str + `"');]` // doesn't work :(

Cheers.

Iram



All Replies
  • Hi Iram,

    EVAL block is calculated on server side and replaced by result before sending HTML/JavaScript to the browser. For that reason EVAL block cannot use browser-side variables. It can, however, use any template tokens available from tokenhelpers  dropdown in the UI.

    Please use Client Side select query.

    Regards,

    Shiva

  • Can you provide an example for that please?

    Iram