3 Replies Latest reply on Sep 29, 2013 8:07 AM by philmodjunk

    How to go to a specific record?



      How to go to a specific record?


           Hi everyone. Good day.


           I'm having another problem. Basically, I'm creating a simple restaurant POS for my friend.



           - So I have different buttons corresponding to different Table numbers

           - If a table is active, meaning they still hasn't billed out, what I want to happen is upon pressing that button, it will redirect me to the order page with details of there orders still there

           - Basically, I need a function that would direct me to order form layout where table number is the specific table number pressed (i need to go to the latest record that contains that specific table number and is still active)

           ' I've been playing with go to related record and go to record but i couldnt get it to work -  because i can't seem to specify in the go to related record which specific table number im looking for



        • 1. Re: How to go to a specific record?

               Set up your button to pass the table number as a script parameter if you have a button for each table. That way, all the buttons can perform the same script.

               Option 1: Go To Related Records:

               Set Field [YourTable::KeyField ; Get ( ScriptParameter ) ]
               Commit Records
               Go To Related Records

               Option 2: Perform a find:

               Go to Layout [Specify layout of table to be searched]
               Enter Find Mode [] ---> clear the pause check box
               Set Field [YourTable::TableNumberField ; Get ( ScriptParameter ) ]
               ##you might need to specify additional criteria with additional set field steps---don't know enough about your system to tell
               Set Error Capture [on]
               Perform Find.

          • 2. Re: How to go to a specific record?
            Will this work even if the table of Tables is just a child of the parent Order? I mean the entries in the table Tables does not get long: it just gets updated. For example I have permanently 14 tables in the database. Their status just gets updated between 'Free' and 'Active'.
            • 3. Re: How to go to a specific record?

                   Option 2 will work in any case. Option 1 requires a relationship that correctly matches to the one specific record you want to see brought up. And a specific relationship can be designed to produce that result without changing existing relationships if that is necessary.

                   I'd need a much more detailed description of your tables and relationships before I can discuss either approach in more detail.