Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Creating a Script


daverushton
 Share

Recommended Posts

I created a student record table which has the fields "teacher," "student first name" and "student last name." It also has the student's "birthdate" and I created individual fields with one checkbox for "homeroom" "first period," "second" etc. I am trying to create a "Homeroom Report/Layout" where all that information will be in the report, but only if it is checked "homeroom" not "first period," "Second" etc.

 

What actually happened is I have the report with all the student names and birthdates but I also have the "homeroom" field either checked or not. I just want the names and birthdates of those who have the checkboxed "homeroom" in the report. Do I need a script? Is there another way?

 

I was thinking something along the lines of ifEmpty (homeroom field) then don't show name and birthdate or teacher but I can't get it to work

 

thanks!

Link to comment
Share on other sites

Define the following two fields in StudentRecords table:

 

RecID, numerical calc, = Get(RecordID)

 

RecID_ifHomeHoom, numerical calc, Case(not IsEmpty(homeroom field), Get(RecordID) )

 

Make a relationship between them. This will prompt a new Table Occurrence for StudentRecords, let's name it "StudentRecordsIfHomeRoom"

 

Using the portal tool, create a portal of only one record height to StudentRecordsIfHomeRoom. For the moment, format that portal with no border line but bright gaudy purple. Drag that portal to where you wish to display name and birthdate and teacher. Select those fields, move them to the front/top using the Arrange menu, and move them onto the portal. Double-click each field in turn, and then select from the overhead dropdown list of table occurrences the STudentRecordsIfHomeRoom TO. The fieldname should remain the same automatically. Once you have done this, click on the lurid purple portal and change it to transparent. With no border line and set to transparent, the portal should be invisible.

 

When homeroom field is not empty, the portal relationship becomes valid, and the fields (which are on the records you're on, you're just viewing them through a self-join relationship) are visible. When the portal relatioship is not valid, the fields are invisible and inaccessible.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use