Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to filter by display values instead of values IDs?

    Hi Isomorphic,

    we have a problem how to filter on grid by display value instead of value key ID... We have column service which get data from DS. In DS it is done by value map ...

    Code:
     <field name="service" type="text" primaryKey="true" escapeHTML="true">
                <valueMap>
                    <value ID="LOAD_MONEY_FROM_PARENT_ACCOUNT" />
                    <value ID="LOAD_MONEY_POS" />
                    <value ID="LOAD_MONEY_P2P" />
    .
    .
    .
    .
               </valueMap>
    
    </field>
    But, on client side we translate KEYs into user friendly display values ...

    Click image for larger version

Name:	filter_by_key1.jpg
Views:	81
Size:	39.0 KB
ID:	256574


    But when we want to filter by e.g. : load, load money whch are in list we got no data...

    Click image for larger version

Name:	filter_by_key2.jpg
Views:	63
Size:	25.4 KB
ID:	256575

    Click image for larger version

Name:	filter_by_key3.jpg
Views:	64
Size:	8.3 KB
ID:	256578

    When we put there value from key ID it is working ... <value ID="LOAD_MONEY_WIRE_TRANSFER" />

    Click image for larger version

Name:	filter_by_key4.jpg
Views:	69
Size:	16.1 KB
ID:	256577

    Any ideas?

    Thanks.


    Required info:
    1. SmartClient Version: v10.0p_2018-06-25/PowerEdition Deployment (built 2018-06-25) ... SmartGWT: 5.0-p20180625
    2. for developing Firefox: 26.0 and directly to server: Chrome - Version 71.0.3578.98 (Official Build) (64-bit)
    Attached Files

    #2
    If there are special display values that the DataSource is never given, obviously filtering cannot be expected to work on the display values..

    You can either correct the valueMap so that the display values are included, or take the approach of having a separate displayField. For the latter, take a look at DataSourceField.includeFrom.

    Comment

    Working...
    X