Using a Table

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Using a Table

  • Creator
    Topic
  • #50639
    Garrett Fletcher
    Participant

      Hello Everyone,

      I am a TCL and Cloverleaf noob. I have a question about using a table in a tcl script.

      I want the script to search a table and return the value if it is found on the table. Otherwise I want the script to return something saying that the value was not found in the table. The problem is I dont know what this code returns when the value is not found in the table. Here is the code.

      Code:

      set logicianDoc2 [tbllookup $table2 $docId2]

      Can you please tell me what this returns if the value is not found in the table?

      Thank you,

      Garrett[/code]

    Viewing 1 reply thread
    • Author
      Replies
      • #66923

        If your table has a default value set, then it will return the default value. Else it will return “” (nothing).

        -- Max Drown (Infor)

      • #66924
        Garrett Fletcher
        Participant

          Great, thank you.

          Garrett

      Viewing 1 reply thread
      • The forum ‘Tcl Library’ is closed to new topics and replies.