Automate

 View Only
  • 1.  Negative Signs on JE Script

    Posted 02-15-2019 09:17
    My FB50 scripts are both cell based and column based and I'm trying to create a condition to convert a negative number to positive.  In Excel I usually use if <0 then *-1 but for some reason this doesn't work. 

    Any suggestions?

    ------------------------------
    James Tobin
    ------------------------------


  • 2.  RE: Negative Signs on JE Script

    Posted 02-19-2019 13:32
    Hi James, does it work to multiply the number by itself and then take the square root?

    Derek

    ------------------------------
    Derek Sayres | SAP PLM Business Analyst
    Entegris, Inc. | (952) 556-1818
    ------------------------------



  • 3.  RE: Negative Signs on JE Script

    Posted 02-20-2019 04:23
    Hi James,
    The Excel function ABS() should work.

    regards, jan​

    ------------------------------
    Jan Ketele | Sr engineer release management
    Xeikon Manufacturing NV | +3234431875
    ------------------------------



  • 4.  RE: Negative Signs on JE Script

    Posted 02-20-2019 09:22
    ​Hi Jan,
    thanks for the ABS formula this is the cleanest way. 

    However how does the transform rule work exactly?  I tried using a formula =ABS(E) (amount is in column E) because I'm using a row identifier of D but the formula is invalid.  If I use a cell (eg. =ABS(E16)) then the formula is valid but it doesn't work correctly.  Meanwhile I'll do some digging around

    Thanks
    James

    ------------------------------
    James Tobin |

    ------------------------------



  • 5.  RE: Negative Signs on JE Script

    Posted 03-20-2019 15:23
    Hi

    Below are two options that you might be able to use with the formulas shown for each.

    Entered Data

    Formulas
    Hope this helps

    ------------------------------
    Bob Glitch | SOLUTIONS ENGINEER
    Winshuttle North America | 7402381807
    ------------------------------



  • 6.  RE: Negative Signs on JE Script

    Posted 03-26-2019 11:31
    Hi Bob,
    I was using the *-1 formula in Excel in a separate column and pointing the script to that column.  But can I achieve this using the transform formula in Studio 11.4.1 or another place?  Thanks​

    ------------------------------
    James Tobin
    ------------------------------



  • 7.  RE: Negative Signs on JE Script

    Posted 03-27-2019 08:32
    Hi James,

    I have attached a sample FB50 script and Excel file that takes a column with negative values (Column I) and Transforms them into positive values in Column L, for the load.  This is done in the Winshuttle Script, I have attached that as well.  Please see line 21 in the attached Winshuttle script for the transform rule I used.  Please let me know if this is what you where looking for or if there is something else you needed.

    Thanks,
    Bob

    ------------------------------
    Bob Glitch | SOLUTIONS ENGINEER
    Winshuttle North America | 7402381807
    ------------------------------

    Attachment(s)



  • 8.  RE: Negative Signs on JE Script

    Posted 03-27-2019 10:15

    This is helpful thank you – I used a similar approach in my script but the formula was in the template as opposed to Winshuttle.  It's helpful for me to see the usage of the transform formula

     

    Thanks again

    James