List and Detailed Views on Same Layout

(Dev Manual)

Screen shot 2011-03-01 at 2.29.10 PM.png


Sample from the PARP:PS database. The list view is on the left and the detail on the right.


To make a list view and detailed view on the same layout for browsing, follow these instructions:


1. Each table involved needs a global field for temporarily storing the serial number of the object to be detailed. Accession number in the Finds table is used for _GlobalAccNum. The SU table has a field named _GlobalSU, etc. 


2. A script needs to be written that clears the _Global fields whenever possible. A simple

Set Field [Finds::_GlobalAccNum; " "] will do. Note that this inserts a space. This is for the conditional formatting in step 7, so it doesn't highlight the records with no Acc Number. In the PARP:PS database this script is called ClearGlobals, and covers the trench images, finds, and su tables all at the same time.


3. In the layout setup for each layout involved, use Script Triggers to run the ClearGlobals script OnRecordLoad.


4. You will need a new instance of the table in the Relationships. For Small Finds make a new Finds table (I called mine FindsDetail), and make it relational by FindsDetail::AccessionNum = Finds::_GlobalAccNum

Then make all of the visible detailed fields viewed from the FindsDetail table and not the FindsArtifacts table. 


5. Then make a script that takes the related record and throws its serial number into the global field. 

Set Field [Finds::_GlobalAccNum; Finds::AccessionNum]

Commit Records/Requests [No dialog]


6. Assign the script from step 5 to the > sign on the right of the portal.


7. As an extra step, use Conditional formatting on the > sign so it doesn't show up when it is not needed. For the Artifacts from a trench, for instance, use Formula IsEmpty ( Finds::AccessionNum )


<- Create Accession Number Script Script Triggers ->