Forum Post: RE: create 2d arrays with Rollbase API and store in client-side variables

  • Thread starter Thread starter gwf
  • Start date Start date
Status
Not open for further replies.
G

gwf

Guest
Thank you, Orchid. So I think to get the array into the variable is as straightforward as var clientArray = []; function myCallback(values) { clientArray = values; } alert(clientArray); } rbf_selectQuery("SELECT field1#value,COUNT(field1#value) FROM object1 GROUP BY field1#value", 1000, myCallback); But if the alert statement comes outside of the callback function (or if I try to use the clientArray variable in any way outside of the function) it doesn't work. I want to store the array in the client-side variable so I can use it in the UI, so I need to access the variable outside of the callback function. Is there a way to do this with rbf_selectQuery? Or should it be done with an EVAL block and rbv_api.selectQuery? If so, what would that code look like? Thank you, Greg

Continue reading...
 
Status
Not open for further replies.
Back
Top