How to use argumentcollection attribute in cfinvoke tag
artscomponent.cfc
<cfcomponent displayname="ArtsCFC" hint="Art Discover">
<cffunction name="GetArts" access="remote" returntype="query">
<cfargument name="ArtistID" type="numeric" required="yes">
<cfargument name="MaximumPrice" type="numeric" required="yes">
<cfquery name="ArtDetails" datasource="cfcodeexplorer">
Select ArtName, Description, Price
From ART Where ArtistID = #arguments.ArtistID# And Price <= #arguments.MaximumPrice#
</cfquery>
<cfreturn ArtDetails>
</cffunction>
</cfcomponent>
argumentcollectionexample.cfm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to use argumentcollection attribute in cfinvoke tag</title>
</head>
<body>
<h2 style="color:DarkBlue; font-style:italic">
How to use argumentcollection attribute in cfinvoke tag
<br /> to pass all arguments as a structure
</h2>
<hr width="550" align="left" color="PowderBlue" />
<br />
<cfset argsCollection.ArtistID = 1>
<cfset argsCollection.MaximumPrice = 12000>
<cfinvoke
component="artscomponent"
method="GetArts"
returnvariable="ArtQuery"
argumentcollection="#argsCollection#"
>
<cfdump var="#ArtQuery#" label="Arts Details">
</body>
</html>