Hmm, well maybe someone can help the newbie out... here's what I am
trying in an extended dmfile... Icopied the beforesave function then
added in this:
<!--- EXTENDED: determine the division & pub type folders via category
--->
<cfparam name="arguments.stProperties.pubdivision" default="">
<cfparam name="arguments.stProperties.pubtype" default="">
<cfif structKeyExists(arguments.stProperties,"pubdivision")>
<cfquery name="qDivAlias"
datasource="#application.dsn#">
SELECT categoryid,alias
FROM #application.dbowner#categories
WHERE categoryid =
'#arguments.stProperties.pubdivision#'
</cfquery>
<cfif qDivAlias.recordcount EQ 1>
<cfset divFolder = Trim(qDivAlias.alias)>
<cfset filepath = filepath & divFolder />
<cfset
arguments.stFields.filename.Metadata.ftDestination =
arguments.stFields.filename.Metadata.ftDestination & divFolder>
</cfif>
</cfif>
<cfif structKeyExists(arguments.stProperties,"pubtype")>
<cfquery name="qPubAlias"
datasource="#application.dsn#">
SELECT categoryid,alias
FROM #application.dbowner#categories
WHERE categoryid = '#arguments.stProperties.pubtype#'
</cfquery>
<cfif qPubAlias.recordcount EQ 1>
<cfset PubFolder = Trim(qPubAlias.alias)>
<cfelse>
<cfset PubFolder = "misc">
</cfif>
<cfset filepath = filepath & PubFolder />
<cfset arguments.stFields.filename.Metadata.ftDestination =
arguments.stFields.filename.Metadata.ftDestination & PubFolder>
</cfif>
<!--- END EXTENDED --->
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---