ORDA: retrieve "record number" value

Hi,
there is a way to get the same number returned by “Record Number” into an ORDA “ds[tablename].query…” statement?

TIA,
Gianluca

Hi

I believe that you have to move your ORDA selection in ‘4D selection’ to be able to do that.
ORDA use primary key as reference to an entity.

Patrick

Thanks Patrick,
Is perfect that ORDA use primary key as enitities reference. My need is to -retrieve- the record number value, not to use it as query argument.
For example using SQL I can do it, reading the virtual field “__ROW_ID”. My wish is to have similar capability using ORDA.

Why you need this information?

Need to do some work on a very big project that has lot of methods and very deep usage of record number value to locate records.

Even if you can reach it, this is not a good idea to use it… :roll:

I know, and my intention is to migrate to a more modern way, but need lot of work and time to fix, and in the meantime I need the application to work anyway…

I confirm ORDA uses the primary key to get a unique entity.
What would be your input information to get the record number ?

As a turnaround, you could add a field “recordNumber” to access it easily (don’t now if applicable to your situation…)(and of course you need to fill it and update it if necessary…)

: Marie-Sophie LANDRIEU

What would be your input information to get the record number ?
ds.aTable._ROW_ID :mrgreen:

: Gianluca RIGOTTI

my intention is to migrate to a more modern way, but need lot of work
and time to fix, and in the meantime I need the application to work
anyway…

Start the other way around. Convert your low level routines to accept PK instead/alternative of record number. This can be done step by step, while your application continue to work.
First convert the called methods. Then the caller.

Yes Thomas, I’ll sure do it and I know how to.
But right now this is -not- an answer of my question… Retrive Record
Number value using ORDA is possible or not actually?
In other words, the Arnaud joke:

: Arnaud DE MONTARD
: Marie-Sophie LANDRIEU

What would be your input information to get the record number ?
ds.aTable._ROW_ID :mrgreen:

(or something similar) exist?

no. ORDA is not based on physical data, like position on disk.
It is based on unique IDs = Primary keys.
It is not based on field numbers or table numbers, but table names. Etc.

As Thomas said: the record number as you know, is more a black box. It is not persistent. You can imagine, that the record number may change (any time). If someday the 4D database re-organise the database itself at runtime, the record number can change every second.

I recommend strongly to rewrite this part of code in the future.

I’ll sure do (work in progress).
Thanks to all! :pray: