Announcement

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

    DataSourceField valueMap default and/or NULL mapping

    Is there any way to define a valueMap value that acts as a catch all for ID's that don't match other values? I've got a valueMap defined as:
    Code:
    <valueMap>
      <value ID="1">value1</value>
      <value ID="2">value2</value>
    </valueMap>
    But I'd like to define any other value (i.e. 3, NULL, etc) to be: Unknown
    If that's not possible - is there a way to at least specify what a NULL value should map to?

    #2
    There's not currently a way to do this with a valueMap - it requires defining a CellFormatter and using similar programmaticformatting APIs. If this is a recurring issue, it would be a valid sponsorship to have the idea of a default value added to both client and server processing (including automatic validation).

    Comment


      #3
      If this hasn't been addressed yet, I would like to sponsor this.

      Comment


        #4
        Just to clarify what you're looking for:

        If you're worried about just null, you can use listGrid/detailView.emptyCellValue and FormItem.emptyDisplayValue to control how null is rendered without needing to implement a formatter. As a (pretty trivial) sponsorship we could provide a single property on DataSourceField to control this across all DBCs with one setting.

        If you're looking for the more comprehensive idea of a "default value" for a valueMap for any value that doesn't appear in the valueMap, that's a bit more involved.

        Either way, please use this page to kick off the discussion, and please clarify which of the above you want.

        Comment

        Working...
        X