Topic
  • 2 replies
  • Latest Post - ‏2014-07-01T19:45:34Z by jvanboga
ManojBansal
ManojBansal
26 Posts

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

  • jvanboga
    jvanboga
    419 Posts
    ACCEPTED ANSWER

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

    ‏2014-07-01T19:45:34Z  

    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" )

     

     

  • LearningWTX
    LearningWTX
    3 Posts

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

    ‏2014-07-01T14:23:40Z  

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

  • jvanboga
    jvanboga
    419 Posts

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

    ‏2014-07-01T19:45:34Z  

    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" )