Cant figure how to link a ordered result to the datatable from i get it

The only way i find to order a dataset was that:

aOrderedTipoActividad : NSArray; fTipoActividad: DADataTable; aOrderedTipoActividad := fTipoActividad.rowsSortedByField(fld_tipoactividad_descripcion) ascending(true);

As this is the datasource for a picker control, i need to get that picker position (same than the position inside aOrderedTipoActividad) and get and get another field value (the id field) from the orignal dataset.

In android is easy because im ordering the REAL dataset, but now, i have a array not linked in any way with the dataset.

How must i get the record linked (im clear is not linked), to get the field id from the fTipoActividad Datatable?

Best regards.

define “real” dataset. what exactly is the problem?

Have a DADatatable and need to order to show in a UIPickerView control.

fTipoActividad: DADataTable;

To order i generate a NSArray and fill the UIPickerView

aOrderedTipoActividad : NSArray;

aOrderedTipoActividad := fTipoActividad.rowsSortedByField(fld_tipoactividad_descripcion) ascending(true);

Then i have the position selected on the UIPickerView and is a position in the NSArray aOrderedTipoActividad
How to know wich record in fTipoActividad is?
Or theres any way to order the fTipoActividad DADatatable without pass it to another array?

I hope to be clear,let me know,

Best regards.

you can get the record just by getting it from the array?

1 Like

Ok, for some reason i believe was a strings array, not a datarows array… Thanks!

1 Like