locked
How to change field values RRS feed

  • Question

  • Hi all,

    From source system I'll get specific values for a particular field, now I want to change those values when I send that to destination system
    For example:

    ABC should change to XYZ
    DEF should change to UVW
    GHI should change to RST

    Always I'll get the same values for that field and I have to convert them to new values while sending.

    Can someone tell me how to achieve this?

    Thanks

    Chandra Rajesh

    Monday, October 17, 2016 11:15 AM

Answers

  • In the case, you can code the lookup/translation directly in the Map using a Scripting Functoid or external helper function also called through a Scripting Functoid.
    Monday, October 17, 2016 12:02 PM
    Moderator
  • Hi ChandraRajesh,

    1)You can create a Business Rules Engine Policy returning output based upon the incoming field value here.

    2)Create a dontet helper class which calls the BRE policy and returns the required Value

    3)Use a  scripting functoid and call this helper class method, which would return the value based upon incoming value to the rule.

    4) Pass this value as a return value to the destination.

    This way you can keep the data transformation seggregated to the BRE and it can change any time you require

    Regards,


    Mandar Dharmadhikari


    Monday, October 17, 2016 12:02 PM
    Moderator

All replies

  • You should do this in transformation. What you want to do is a typical transformation and hence you can use a map to do this. Complicating this is not advisable.

    Pi_xel_xar

    Blog: My Blog

    BizTalkApplicationDeploymentTool: BizTalk Application Deployment Tool

    LinkedIn: LinkedIn

    Monday, October 17, 2016 11:17 AM
    Answerer
  • Hi ChandraRajesh,

    How many values you need to change..just the above three?? and will the values always be same meaning ABC would change to XYZ ??? The easiest way to do this is by using a map and changing the values...

    Regards,


    Mandar Dharmadhikari

    Monday, October 17, 2016 11:18 AM
    Moderator
  • For this, you would use a Map.

    Does the incoming message have only 3 fields?

    Monday, October 17, 2016 11:22 AM
    Moderator
  • hello Mandar,

    I'll get 10 values, for any message which come from source system will have any one value from that 10 values for that particular field.

    Redards

    Chandra Rajesh

    Monday, October 17, 2016 11:26 AM
  • hello Mandar,

    I'll get 10 values, for any message which come from source system will have any one value from that 10 values for that particular field.

    Redards

    Chandra Rajesh

    Sorry, can you please elaborate on this...it will be helpful if you can share sample request response xmls

    Regards


    Mandar Dharmadhikari


    Monday, October 17, 2016 11:30 AM
    Moderator
  • No John it will get any of the 10 values for that particular field.
    Monday, October 17, 2016 11:31 AM
  • How often will the value mapping table change?

    Meaning, will the 10 incoming values always map to the same 10 outgoing values or do you really need to make them configurable?

    Monday, October 17, 2016 11:39 AM
    Moderator
  • 

    This is my Input Schema, for File name every time I'll get one of the below message 

    MSAPADSE_2SUPITTPDDOSUPITTPDFO etc, now I have to convert this to

    If MSAPADSE_2 comes It has to go to destination system as Admin Prospectus

    If SUPITTPDDO comes It has to go to destination system as Admin Domestic

    if SUPITTPDFO comes It has to go to destination system as Admin Foreign and so on..

    Monday, October 17, 2016 11:50 AM
  • all 10 incoming values always map to same 10 outgoing maps each time
    Monday, October 17, 2016 11:54 AM
  • In the case, you can code the lookup/translation directly in the Map using a Scripting Functoid or external helper function also called through a Scripting Functoid.
    Monday, October 17, 2016 12:02 PM
    Moderator
  • Hi ChandraRajesh,

    1)You can create a Business Rules Engine Policy returning output based upon the incoming field value here.

    2)Create a dontet helper class which calls the BRE policy and returns the required Value

    3)Use a  scripting functoid and call this helper class method, which would return the value based upon incoming value to the rule.

    4) Pass this value as a return value to the destination.

    This way you can keep the data transformation seggregated to the BRE and it can change any time you require

    Regards,


    Mandar Dharmadhikari


    Monday, October 17, 2016 12:02 PM
    Moderator
  • Hi chandraRajesh,

    Check the article below

    Calling a BRE Policy from Map


    Mandar Dharmadhikari

    Wednesday, October 19, 2016 11:16 AM
    Moderator