I've been told a cffunction should have no more than 3 arguments - Is there a better way to write this function? Every argument is a possible filter on the previous window and is used to filter the results down in the where clause.
<cffunction name="Example" access="remote" returntype="query">
<cfargument name="keyword" type="string">
<cfargument name="office" type="numeric">
<cfargument name="builder" type="numeric">
<cfargument name="sup" type="numeric">
<cfargument name="mgr" type="numeric">
The code you have in your question is better than this suggestion:
The reason is that a struct can contain anything and is not restricted to what the function really needs. In the case of the function in the question, it really needs one string and four numbers.
That being said, you can still pass a struct, such as a url to your function. It's a simple matter of this: