application.getValueListDisplayValue and Memory

Hello,

I am confused by some behavior I am observing from application.getValueListDisplayValue()…

I have a table in my database that contains approx. 210K records. In this table, I have two columns: one which holds a unique ID and another which holds a 10-char string.

I have created a valuelist that uses this table. It is coded to: “Database Values” → “All Values From” → MyTable → MyColumn (type 1 valuelist). The valuelist returns into the dp the unique id, and displays the 10-char string. So with that in mind I should be able to pass - as the second paramter to the application.getValueListDisplayValue method - the unique id associated with the 10-char string, to get the 10-char string returned. The good news is that this works for the first 232 records in the table. The bad news is that it fails on every unique ID thereafter; returning null.

Is it possible that there is a memory issue here? Can getValueListDisplayValue only work with so many bytes before it can’t reference the display value for a real value anymore?

Puzzled…any help would be appreciated.

Hi Jeff,

The good news is that this works for the first 232 records in the table. The bad news is that it fails on every unique ID thereafter; returning null.

Are the records beyond #232 loaded?
If I am not mistaken it not possible to get to a record by id when they are not loaded…

Hello

None of the records are loaded yet when this script runs. I also tried this on another table where the display value had fewer chars and i got 500+ records before null values

Jeff,

Value lists based on tables are loaded to max 500 records.
If your table contains more rows and the sorting used (defined in the value list) is different from the order you are looping through your values you may get nulls returned earlier than with record 501.

Rob