PureConnect

 View Only
Discussion Thread View
  • 1.  Read txt file from within handler

    Posted 02-15-2022 04:24
    #HandlerQuestions
    #Handlers

    Hello everyone,

    Did anyone solve challange to read txt file from handler?

    Intention is to read file line by line, parse line and process results in next handler's steps.

    As source is simple text file:

    300|1234567
    301|9874566
    ...

    Thank you for help

    Best regards

    Pavel 

    ​​
    #AskMeAnything(AMA)
    #Handlers

    ------------------------------
    Pavel Broska
    Alcasys Slovakia a.s
    ------------------------------


  • 2.  RE: Read txt file from within handler

    Posted 02-15-2022 08:02

    Done it several times with the FILE IO tools.

    It has always been finicky for me but worked




    ------------------------------
    ryan hedlund
    ------------------------------



  • 3.  RE: Read txt file from within handler

    Posted 02-15-2022 08:22
    finally, I used similar way as you mentioned
    Just needed to modify source txt file a little bit, add delimiter at line end ("+") and at list itself ("*").
    //
    17226|2001135699+
    17535|2001137500+
    17761|2001137829+
    *
    //
    then File Read List  returned list of items in file, after that parse list and execute required steps. In my case, disconnect interactions and update database table.
    //

    //

    ------------------------------
    Pavel Broska
    Alcasys Slovakia a.s
    ------------------------------



  • 4.  RE: Read txt file from within handler

    Posted 02-15-2022 08:32
    Yes it has been a while since I did this and have no handlers now reading from file but i remember i had to mess around to get it to read in properly, like i said it seemed finicky but worked just had to get it figured out.

    It kind of sucks how the read tool works but hey it works once you get it to work.

    ------------------------------
    ryan hedlund
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources