getValueListDisplayValue problem

I am having problems with a call to getValueListDisplayValue. The code snippet below is problematic. An identical call to another valuelist works properly; the one below does not. The only difference between the 2 valuelists is that the one that works is linked directly to a table key while the one that does not work goes through a relation. sys_subregion_id is an integer as is the subregion data provider column. Returns null per debugger. I have confirmed that the inbound parameter (sys_subregion_id) is a known integer value in the target db.

if (application.getValueListDisplayValue('Subregion_id_from_globals', sys_subregion_id) == subregion)
{advice_str += 'Keyed subregion and current Subregion setting cross-check. \n'; sub_crosscheck = true;}
else
{advice_str += 'ERROR:  Keyed subregion and current Subregion setting DO NOT cross-check. \n';}

Any known issues with this method? 3.5 final.

Thanks, Michael

This is NOT a Servoy issue/bug … it is my bug. :roll:

I needed to use another relation as the one I had used was 1:n whereas the routine needed 1:1 for its cross-check. The function in question appropriately returned a null since it is expecting 1:1 for the real value that corresponds to the display value. If 1:n is in the relation for this function it has no other sensible option but to fail and return a null.

Thread left here just in case anyone else runs into this.

application.getValueListDisplayValue allways returns null in

Servoy Developer
Version 3.1.6-build 410
Java version 1.5.0_07-87 (Mac OS X)

Could this be fixed please?

Yep,

I’ve seen this too, same setup.

Could this be fixed please?

Now that Robert confirmed this, have you added it to the support system?