3 Replies Latest reply on Jan 16, 2014 1:34 PM by philmodjunk

    Case Statements, "Table can not be found"

    ChadGist

      Title

      Case Statements, "Table can not be found"

      Post

           I am trying to use the Case statement below in a calculation. If I use a number for the result, it works great, but I am trying to use an abbreviated text result. When I use the text result, I get the message "Specified table can not be found". 

           Case(WIP_list::gWharehouse="Custom";WCU;)

           Is it possible to make this work with text?

        • 1. Re: Case Statements, "Table can not be found"
          philmodjunk

               If you want the text WCU returned, use:

               Case(WIP_list::gWharehouse="Custom"; "WCU")

               If WCU is the name of a field, remove the semi colon after it.

               Case(WIP_list::gWharehouse="Custom" ; WCU )

          • 2. Re: Case Statements, "Table can not be found"
            ChadGist

                 Ah yes, thank you!

                 If I am using this result to perform a Find, and I want the Find to return results that match either of two values, how can I do that? I can make it work with a range of values right now, but luckily I have no other values in that range as of this date. For instance:

            Case(WIP_list::gWharehouse="Custom"; "WAB...WCU")

            • 3. Re: Case Statements, "Table can not be found"
              philmodjunk

                   Enter Find mode []
                   Set FIeld [YourTable::Field ; first criteria goes here ]
                   New record/Request
                   Set FIeld [YourTable::Field ; second criteria goes here]
                   Set Error Capture [on] ---> keeps no records found error dialog from interrupting script when no records are found
                   Perform FInd []

                   Will find all records that meet the first or second criteria. Other methods, such as extend found set, can also be used to get the same results.

                   You may find this thread of scripted find examples useful: Scripted Find Examples