Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2014-07-01T19:45:34Z by jvanboga
ManojBansal
ManojBansal
26 Posts
ACCEPTED ANSWER

Pinned topic How to map default value to many fields in quick and easy way

‏2014-07-01T08:49:08Z |

Hello,

There is a mapping scenario where we need to map the default values to around 500 mandatory fields if there corresponding input fields does not have the data present in input file. 

Default values are defined based on data type of the field, if its string, map " " (space), numeric - "0" (zero), datetime - "19900101" as default.

Can we achieve this using some script or I need to do it using the tradition way by writing the "IF" condition on all 500 fields?

Thanks in advance
Manoj

  • LearningWTX
    LearningWTX
    3 Posts
    ACCEPTED ANSWER

    Re: How to map default value to many fields in quick and easy way

    ‏2014-07-01T14:23:40Z  in response to ManojBansal

    Create a table with 500 entries, then do use "extract"

  • jvanboga
    jvanboga
    416 Posts
    ACCEPTED ANSWER

    Re: How to map default value to many fields in quick and easy way

    ‏2014-07-01T19:45:34Z  in response to ManojBansal

    Open your type tree, change the definition of the space and zero filled required element to pad spaces or zeros to the minimum size.

    not sure about an easier way to deal with the date issue than by writingthe rule as

    either(datetime:element, "19900101" )