Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1995
Find in combo
posted

Mike,

I am using IG 2011 v2 Service release 2004. In my application to find the value exists in the combo and to get the display text of given key value, i am using "GetText".

Last week i faced one problem. If i gave a value in uppercase and the original value is in propercase in combo, the result of GetText is coming as Nothing. Whether the GetText is case sensitive?

Example :

My combo contains UOM with uomcode as first column and description as second column.

UomCode     -  Description

Lt                       Litre

Kg                     Kilogram

Mt                     Meters

Gr                    Gram

Scenario 1 :

I call the gettext as below

Dim lnIndex as integer = -1

dim lsDisplaytext as string = ""

lsDisplaytext = Combo.Valuelist.GetText("Kg",lnIndex)

The result is coming as "Kilogram" for lsDisplaytext and 1 in lnIndex

Scenario 2:

If i call as below

lsDisplaytext = Combo.Valuelist.GetText("KG",lnIndex)

The result is coming as Nothing for lsDisplaytext and -1 in lnIndex.

 

Whether the key value should be case sensitive? Guide me.

 

  • 469350
    Offline posted

    Hi,

    Clearly the GetText method is case sensitive. Since it's matching a DataValue, it needs an exact match, regardless of the data type of the value.