Solved

Can I return multiple columns of data from a Client Script?

  • 9 December 2019
  • 1 reply
  • 267 views

Userlevel 5
Badge +12

Is it possible to convert the returned data from a Client Script SQL to multiple columns in a Client Script so that you can return muliple columns into a Data Source which I can directly show in a list element in the Lobby?

From what I have learned I am able to create a ‘Client Script SQL’, which I call from an Client Script with the function getDBValues(“Client Script SQL id” ). From there I am able to return a list of data in a column called Return. This is some default ‘column’ which I can return from a Client Script, but I am wondering if I can return multiple columns in the Client Scrip for the Data Source to read and select instead of just one called ‘Return’?

icon

Best answer by Mike The FSM TechnoGeek 23 January 2020, 16:27

View original

1 reply

Userlevel 5
Badge +17

This is possible with Client Scripting, but only for the Web Client.  The function you want is GetDBValues(),  Take a look at how it is used in some of the baseline Client Scripts like BULKTHIRDPARTY_PART_ID_CHANGE.  Only the web client supports the array data structures needed to retrieve tabular results.

Reply