Question
Passing Flex 2 TextInput value to CFC
If I have a Flex 2 TextInput with an id of 'querymonth' how
can I pass the value entered into that to replace the hard-coded
value of 'feb' in the following CFC, so I can enter the month into
the TextInput before firing off the Query, and have it read the
value I just entered in the CFC?
In other words, it currently says:
WHERE REPORTS.ReportDateMonth = 'feb'
But I'd like it to say, in pseudo-code
WHERE REPORTS.ReportDateMonth = 'The value I just entered into this here Flex 2 TextInput box'
<cfcomponent>
<cffunction name="getMasterQuery" output="false" access="remote" returntype="query">
<cfargument name="ID" required="false">
<cfset var qRead="">
<cfquery name="qRead" datasource="UN">
SELECT ReportType, ReportDateMonth, ReportDateYear, ReportingMember, ReportedByDueDate, ReportedDateIfLate, ReportIsNil
FROM REPORTS
WHERE REPORTS.ReportDateMonth = 'feb'
</cfquery>
<cfreturn qRead>
</cffunction>
</cfcomponent>
I need to check monthly against a total constituency and who has not reported, and after this goes into production, I won't often have easy access to go running the Query Builder in Flex/CF to change the month (not to mention, administratively, this is MUCH more convenient!). I'm sure it's simple, but I've never had to really try to use CF code yet other than a couple of things here and there...
Any help would be appreciated.
Shawn
In other words, it currently says:
WHERE REPORTS.ReportDateMonth = 'feb'
But I'd like it to say, in pseudo-code
WHERE REPORTS.ReportDateMonth = 'The value I just entered into this here Flex 2 TextInput box'
<cfcomponent>
<cffunction name="getMasterQuery" output="false" access="remote" returntype="query">
<cfargument name="ID" required="false">
<cfset var qRead="">
<cfquery name="qRead" datasource="UN">
SELECT ReportType, ReportDateMonth, ReportDateYear, ReportingMember, ReportedByDueDate, ReportedDateIfLate, ReportIsNil
FROM REPORTS
WHERE REPORTS.ReportDateMonth = 'feb'
</cfquery>
<cfreturn qRead>
</cffunction>
</cfcomponent>
I need to check monthly against a total constituency and who has not reported, and after this goes into production, I won't often have easy access to go running the Query Builder in Flex/CF to change the month (not to mention, administratively, this is MUCH more convenient!). I'm sure it's simple, but I've never had to really try to use CF code yet other than a couple of things here and there...
Any help would be appreciated.
Shawn