1 Reply Latest reply on Dec 16, 2010 4:35 AM by sunmoonstar.13

    Using tables in a database

    AndrewClarkson

      Title

      Using tables in a database

      Post

      Hi,

      I'm struggling with a tables issue I hope someone can help me with.

      I have created a sign-in database, where users sign in and out. There are three tables, one for members, a log table, and a list of activities.

      As this is for a rescue organisation, there are times when users need to sign in quickly in bulk. I've uploaded a layout below of how it currently looks (names removed). This layout will show a list of all the members taken from the members table.

      Is it possible to then click the sign in button, and it creates a new record in the log table, then returns to the current layout? The time is taken from a global field, so one user can sign in multiple users for a time other than the current time (eg 2 hours ago). All users have an ID number which is used rather than their name to sign in and out. 

      I've tried the following without success (it just creates an empty record in the log table)"

      Go to Layout ["Log" (Log)]

      New Record/Request

      Set Field [Members::MemberID; Members::MemberID]

      Set Field [Log::SignInTime; Log::gSignInTime]

      Go to Layout ["Fast Sign In" (Members)]

      Thanks - I really appreciate the help from members of this forum.

      Screen_shot_2010-12-16_at_9.59.06_PM.png

        • 1. Re: Using tables in a database
          sunmoonstar.13

          I think the script needs to capture the MemberID first (as a variable), then create a New Record, then set the MemberID field with the value of the variable: 

           

          Set Variable [$_MemberID; Value: Members::MemberID]

          Go to Layout ["Log" (Log)]

          New Record/Request

          Set Field [Members::MemberID; $_MemberID]

          Set Field [Log::SignInTime; Log::gSignInTime]

          Go to Layout ["Fast Sign In" (Members)]

           

          Nick