LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Changing Data Within Fields

    Employee
    Posted 08-07-2015 06:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jchartrand

    Morning -

    Working on changing a few sets of data within a particular field and I am running into a road block for what I feel should be quite simple.

    I would like to change Sysco Newfoundland to Sysco Mount Pearl.

    I have been playing with if-then-else as well as .replace but seem to be coming up blank.

    Here is what I have now...

    NewDCName = 'DC Name'.replace("Sysco Newfoundland","Sysco Mount Pearl")

    emit *, NewDCName


    Subset of Data below

    'DCName'
    Sysco Newfoundland
    Sysco Ontario
    Sysco Quebec

    Any help would be great!

    Thanks


  • 2.  RE: Changing Data Within Fields

    Employee
    Posted 08-07-2015 06:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jchartrand

    User error.

    Some times it is the simplest things that stall the work!

    Thanks,
    J


  • 3.  RE: Changing Data Within Fields

    Employee
    Posted 08-10-2015 06:15

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gauravdb

    Hi,


    The code you written above is working for me without any problem.

    Its just you got a space between DC and Name which should not be there (you probably know that anyways).

    Plus, you can write the below after the emit * to keep the field name same as before

    override emit NewDCName as "DCName"

    Thanks
    GK