I will bring this up again, since it was ignored the first time ;)
I am drilling down using master detail formsets:
Company -> Office -> OfficeEmail
The OfficeEmailEditForm is accessed from an embedded list in the
OfficeEditForm. I am trying to filter the DisplayFilteredSelect tag
which uses the Office.OfficeID foreign key, so that it displays only the
offices for the company drilled down from, by using the
whereClauseExtension attribute:
<cf_DisplayFilteredSelect parentTable="Office" primaryKey="OfficeID"
primaryKeyType="integer" foreignKey="OfficeID"
displayColumn="OfficeName" displayColumnType="varchar(50)"
label="Office" required="Yes" whereclauseextension="CompanyID =
#Evaluate('#Application.persistentScope#.CompanyID')#">
Here is what the query result looks like from the debug stream:
queryResult (Datasource=maritrak, Time=0ms, Records=1) in
C:\CFusionMX7\wwwroot\maritrak\components\DatabaseBlocks.cfc @ 10:01:15.015
SELECT Office.OfficeID, Office.OfficeName
FROM Office
WHERE Office.OfficeID = 662 AND CompanyID = 642
ORDER BY Office.OfficeName
I can't figure out why this query should have the OfficeID referenced in
the query? My filtered select menu should also not display the filter
text field, since it is only returning one record, but it does.
Am I doing something wrong?
Jeff
Jeff Fleitz wrote:
I am working with master detail forms, in particular an Office Edit form
that contains a child list to an OfficePhone table which store phone
numbers and types. Right now there is a Filtered Select menu control on
the OfficePhoneAddForm template which allows the user to select an
office. I have been trying to use the whereClauseExtension and default
attributes to filter the control to the specific foreign key passed to
the form (URL.OfficeID) with no luck. Is there a way to do this?
If not, what do you recommend as a 'best practice' for this type of
scenario. This form will never be accessed from a standard list or
search form, but only from a drilldown. Since I am passing the
parentkey to the form, I am just looking for an easy way to get the
foreign key (OfficeID) saved without having to add a custom query to the
form.
I guess the easiest way is to include a hidden field on the form using
DisplayExtraFormContent, but I would like to be able to display the
Office name on the form.
Jeff
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************