IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Using ToNumber

    Posted 04/27/07 09:42 AM

    Originally posted by: vickey


    Hi,

    I have requirement where the input is a text string and the output is a Number with decimal point.

    Example :

    First requirement:
    My input is a text value coming as "21400" and the output should be as number as below : $214.00

    Second Requirement.
    Input is again text and coming as "5" and the output should be as "5,000"

    Third Rquirement:
    Input is again text coming as "45" and the output should be as "$0.0045"

    Please help me to overcome this requirement.

    Olly thanks for you help on FROMNUMBER, can you help me with this as well.

    -Vikash
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Using ToNumber

    Posted 04/27/07 09:48 AM

    Originally posted by: janhess


    1 ="$" + numbertotext(tonumber(value)/100)

    2 =numbertotext(tonumber(value) * 1000)

    3 ="$" + numbertotext(tonumber(value)/10000)
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Using ToNumber

    Posted 04/27/07 10:01 AM

    Originally posted by: janhess


    If the output field is a number set the currency in the initiator and omit the numbertotext part.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: Using ToNumber

    Posted 04/30/07 10:22 AM

    Originally posted by: vickey


    Janhess,

    Thanks for your reply.

    The solution you have provided are not working for me. can you help me out with the other way around

    Now the input and output both are text items.

    Scenario 1:
    Input is 21400 and Output should be $214.00 (I got solution for this)
    Input is 121400 and the output should be $1,214.00 (Need solution for this)

    Scenario 2:
    Input is 1000 and output should be 1,000
    Input is 528000 output should be 52,800

    Scenario 3:
    Input is 32.66 output should be $32.6600 ( I got the solution for this)
    Rule I used :
    FILLRIGHT(FILLLEFT("$" + Value:ElemDecl AmountReference:Seq:ElemDecl DebitCreditAdjustmentDetails:Seq:DebitCreditAdjustment,"<SP>",22),"0",24)

    But the above rule is not working for the below field.
    Input is 45.6 output should be $32.6000 but with the above rule I am getting the value as $45.600

    Reply is much appreciated.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 5.  Re: Using ToNumber

    Posted 04/30/07 10:33 AM

    Originally posted by: janhess


    The solution to 1 is the same in both cases.
    Define output field as number decimal separators=yes format=#[,]###http://.##initiator $

    2 is the same but without the initiator.

    3 is the same as 1 but specify the decimal min and max as 4
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Using ToNumber

    Posted 04/30/07 03:32 PM

    Originally posted by: vickey


    Thanks for the reply.

    1st solution didnt work for me. its giving me the output for 21400 as 21,400 which the expected output is $214.00 and one more thing is that this value is right justified and when i give the initiator $ is coming on left and value on right ie. $ 21,400 which should be as $214.00.

    2nd solution is perfect and working fine.

    3rd solution is also working fine but the same between $ and values..
    ie. Value is right Justified and so the output is coming as $ 32.6600 which should be as $32.6600

    Please help me out to figure out the 1st and 2nd situations..

    Thanks for the help..

    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 7.  Re: Using ToNumber

    Posted 04/30/07 05:06 PM

    Originally posted by: vickey


    Janhess,

    Thanks for all the help.

    Please ignore my previous post. I have got the expected outputs now for all the three scenarios.

    Last scenario is working fine but a small issue.

    If the input is 32.66 then the output is $32.6600
    But if the input is 0.1975 then the output is $.1975 (here the map is stripping the value "0" before the decimal.

    I have used several ways but could not resolve. Please help me in resolving this problem as well.

    Thanks again for all the help.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 8.  Re: Using ToNumber

    Posted 05/01/07 04:18 AM

    Originally posted by: janhess


    Specify Places Whole# Min as 1
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender