Read / Write to File not Writing to File

Discussion in 'Call Flow Designer' started by helia, Jun 16, 2017.

Thread Status:
Not open for further replies.
  1. helia

    Joined:
    Nov 1, 2016
    Messages:
    12
    Likes Received:
    1
    Please see attached screen shot.

    We have a problem with time based branches not evaluating properly. We're using DateTime.Now.TimeOfDay.Minutes to make the boolean simpler to evaluate for partial hours.

    I'd like to write a log file to better understand variable state during execution and the actual values. To this end I'm using a "ReadWriteFile" block.

    As you can see, I've used a constant of "c:\\temp\\ach_drb.txt" for the txt file.

    If that file is not there, it doesn't seem to be created. Is that the expected behavior?
    If I manually create an empty text file with that name, it doesn't populate.

    My "Content to write" is:

    DateTime.Now.ToString() + " M-T-Lunch *** "

    Is that appropriate?

    The root problem is that the text file is specified is not written to.. What tools are available to help troubleshoot this?

    Darvin Zuch
    HELIA
    http://www.office-phone-systems.ca
     

    Attached Files:

  2. Thomas Wulz

    Joined:
    Dec 3, 2016
    Messages:
    5
    Likes Received:
    0
    You need to use the inbuilt function "concatenate" to write more than one string to the file at the same time.
    Usage: concatenate(string1, string2)
     
  3. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,455
    Likes Received:
    115
    Hi @helia,

    The configuration of your component seems to be correct. You can use CONCATENATE, but it's not mandatory if you don't use project or callflow variables. In this case it's perfectly fine to use the + sign to concatenate the 2 strings.

    If the file is not being created, I would check the 3CX Queue Manager logs to see what's doing the app. Please take a look at this article to understand how to do this:
    https://www.3cx.com/docs/manual/cfd-troubleshooting/

    Pretty sure the log will give you some pointers.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.