transform array with keys directly to foundset ?

Hello Servoy users,

I use often the following instruction to transform a foundset to an array,

//Returns a foundset dataprovider (normally a column) as JavaScript array
var array = databaseManager.getFoundSetDataProviderAsArray(foundset,‘order_id’);

This run very nice.

I transform also array containing primary keys to foundset, using a loop .

Is there also a simple function that I don’t know to do it directly ?

:?:

Thanks in advance.

DomTom

This should do:

databaseManager.getFoundSetDataProviderAsArray()

Hi Patrick,

Thank you for you time,

I know the fine command you propose me to use, but I am looking a command doing the “opposite transformation” : from array to foundset.

Thanks.

:wink:

DomTom.

Oh sorry! I sort of got on the wrong road :? . Then you can use

databaseManager.convertToDataSet(array/ids_string)

and load that dataset. Then you have your foundset.

Thanks Patrick,

That’s always more easy when you know the good function.

:D

DomTom.