turn foundset into a valuelist

Questions and answers regarding general SQL and backend databases

turn foundset into a valuelist

Postby m.moest » Mon May 06, 2013 7:47 pm

Hi,

I have a database table 'db:/dbname/rcg' that has multiple columns including: 'name' and 'id'.

I have a foundset that contain a subset of all ids. Now i want the names of these ids in a valuelist. Does anyone know how to solve this?
m.moest
 
Posts: 5
Joined: Fri Feb 08, 2013 8:22 pm

Re: turn foundset into a valuelist

Postby david » Tue May 07, 2013 2:33 am

See: http://wiki.servoy.com/display/public/M ... eListItems

Code: Select all
var query = 'select display_value,optional_real_value from test_table';
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, 25);
application.setValueListItems('my_en_types',dataset);
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: turn foundset into a valuelist

Postby m.moest » Tue May 07, 2013 10:12 am

Thanks, that is it.
m.moest
 
Posts: 5
Joined: Fri Feb 08, 2013 8:22 pm


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 8 guests