1 Reply Latest reply on Feb 18, 2011 8:52 AM by philmodjunk

    Sections and Sub-Sections Automatically Updated

    pademo57

      Title

      Sections and Sub-Sections Automatically Updated

      Post

      For Training purposes we have a system that uses 4 Sections made up of 10 Sub-Sections. Everytime someone logs on to the system we need it to automatically record and update the information.

      For example:

      John Doe has finished Section 2, Sub-Section 7

      Now he wants to start a new Sub-Section. When Joe clicks on "Next Sub-Section" button, I would like the program to automatically start a new record and update the fields so it shows:

      Section 2, Sub-Section 8

      I'm not sure how to get the variables to work with this. Do I need Global Variables?

      As well, when the student finishes a Section, I would like the program to automatically update the fields for the new section.

      For example:

      Section 2, Sub-Section 10

      After clicking on a button that says "New Section", the next record would show:

      Section 3, Sub-Section 1

      My fields won't update properly.

        • 1. Re: Sections and Sub-Sections Automatically Updated
          philmodjunk

          Variables will help, but they don't have to be global variables for this.

          If [ YourTable::Section ≠ 4 or YourTable::SubSection ≠ 10 ]
             Set Variable [$LastSection ; YourTable::Section ]
             Set Variable [$LastSub ; YourTable::SubSection ]
             New Record/Request
             Set Field [YourTable::Section ; If ( $LastSub < 10 ; LastSection ; LastSection + 1 ) ]
             Set Field [YourTable::SubSection ; If ( $LastSub < 10 ; $LastSub + 1 ; 1 ) ]
          Else
             Show Custom Dialog ["Project is complete"]
          End If