1 Reply Latest reply on Oct 9, 2013 10:14 AM by philmodjunk

    Showing only certain records in a form

    KendraBarksdale

      Title

      Showing only certain records in a form

      Post

           Hello

            

           So I have two forms, one for students and one for faculty, however all of the records are in one table. I have a field with radio buttons that specifies whether the person is student or faculty. Is there a script or something that can make it so that when I am in the student form I only see records that have the student button checked and only faculty in the faculty form? Thanks!

        • 1. Re: Showing only certain records in a form
          philmodjunk

               Enter Find Mode []
               Set field [YourTable::RadioButtonField ; "Student"]
               Set Error Capture [on]
               Perform Find[]

               This script can be set to run with OnLayoutEnter so that each time you access the student layout, the script is performed to find all students.

               Enter Find Mode []
               Set field [YourTable::RadioButtonField ; "Student"]
               Set Error Capture [on]
               Constrain Found Set []

               Can be used with the OnModeExit trigger (select the Find mode check box) so that each time the user performs a find, the results are automatically constrained to just those that are of type student. (Show All records, and Show Omitted Only can still be used to bring up non student records.)

               A completely different option is to set up a portal for listing just students or just teachers with either a relationship or a portal filter that only allows one type of record or the other.