file exists

 5 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
jcarrott
Basic Member
Posts: 7
Basic Member

    I am trying to set a Boolean flag if a file exists so I can control a branch (found/ not found). I can do it in various languages but I am not able to do it in Process Flow.

    Does anybody know how?

     

    John Henley
    Posts: 3353
      if you have LSF9 ProcessFlow Integrator there is a FileAccess node that has that as an option.
      Thanks for using the LawsonGuru.com forums!
      John
      Gary Davies
      Veteran Member
      Posts: 248
      Veteran Member

        variables are defined in the Start node. There is a type of boolean that has a value of true or false.

        You can either check for the value or reference the field

         

        ie if you have a variable called chkflg you can do either

        if (chkflg)

        or

        if (chkflg == true)

         

         

        Gary Davies
        Veteran Member
        Posts: 248
        Veteran Member
          In a branch node it would simply be the following in the statement line
          chkflg
          or
          chkflg == true
          Gary Davies
          Veteran Member
          Posts: 248
          Veteran Member
            An error code of 8 from the FileAccess node is not found.

            If you call the FileAccess FileTest then the variable is called FileTest_errorCode

            so your branch if not found would be:

            FileTest_errorCode == 8

            jcarrott
            Basic Member
            Posts: 7
            Basic Member

              Great! That should do the job. I will check it out.

              Thank you