Find Parent Form (like breadcrumb)
Posted: Mon Apr 27, 2015 8:00 pm
Please pardon the long post...
I would like to be able to find the parent form that called the form I am on... Basically what is before me in the breadcrumb path?
Example:
I have a Name/Address record for performers that have participated in our theater program.
Each performer has 0..X Audition records for each time they have auditioned for one of our shows.
This is a standard One-to-Many relationship.
When working with the "Audition Records" they are added to the table only when the parent record has been identified.
I have added a button to the "Name" form which calls the "Audition" after selecting a performer, This gives me the breadcrumb "path" that I need for adding a new audition record:
Breadcrumb shown on the Audition Browse Form:
Home-->Names-->Bob Smith-->Auditions
The Add button is shown and when clicked goes to the 'Audition" Edit form with the following breadcrumb:
Home-->Names-->Bob Smith-->Auditions-->New Record
This is the desired behavior and is working fine.
Later in the process, we need to be able to work on the group of records for a particular show without regard to the individual performer so I want to be able to call the "Audition" form from the "Home" screen directly.
When called in this fashion, the breadcrumb shown in the Audition Browse form is:
Home-->Auditions
In this case I want to disable the "Add" new record button so that only existing records can be searched and edited.
Is there any way to accomplish this? I assume that I could parse up the DOM object for the breadcrumb and hide the add button in Javascript but that seems kinda clunky...
Any "best practice" suggestions?
Thanks,
Jeff
I would like to be able to find the parent form that called the form I am on... Basically what is before me in the breadcrumb path?
Example:
I have a Name/Address record for performers that have participated in our theater program.
Each performer has 0..X Audition records for each time they have auditioned for one of our shows.
This is a standard One-to-Many relationship.
When working with the "Audition Records" they are added to the table only when the parent record has been identified.
I have added a button to the "Name" form which calls the "Audition" after selecting a performer, This gives me the breadcrumb "path" that I need for adding a new audition record:
Breadcrumb shown on the Audition Browse Form:
Home-->Names-->Bob Smith-->Auditions
The Add button is shown and when clicked goes to the 'Audition" Edit form with the following breadcrumb:
Home-->Names-->Bob Smith-->Auditions-->New Record
This is the desired behavior and is working fine.
Later in the process, we need to be able to work on the group of records for a particular show without regard to the individual performer so I want to be able to call the "Audition" form from the "Home" screen directly.
When called in this fashion, the breadcrumb shown in the Audition Browse form is:
Home-->Auditions
In this case I want to disable the "Add" new record button so that only existing records can be searched and edited.
Is there any way to accomplish this? I assume that I could parse up the DOM object for the breadcrumb and hide the add button in Javascript but that seems kinda clunky...
Any "best practice" suggestions?
Thanks,
Jeff