RE: [coldbox:16139] How to use output of a query inside another query

Helper UDFs are handy and can be used to solve your problem, but it’s not typically the way I go since it’s not really OO (the functions are simply injected directly into your page instead of you given an object to call methods on) and they seem best suited for ad-hoc sort of logic such as formatting. For instance, the singleton annotation in your CFC is being ignored and the component is never really even being instantiated since the includeUDF() functionality is not even close to an object factory. includeUDF also doesn’t cache lookups, so it won’t perform as well either.

Also, please use cfqueryparam on your cfqueries to project against SQL injection attacks on your servers. This is especially import with numeric parameters.

SELECT FacilityId FROM poolingpartners WHERE FacilityID = AND PartnerFacilityId =



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Brad, I did make the suggestion of HTML Helpers, and was looking for the best way to include his, and suggested he might use that. Thinking it might load it up as a HTML Helper as well, which by the sounds is not the case.

That means the best option would be to write an HTML Helper and stick it in the extensions folder, as a plugin extension and so the system uses that instead. Hopefully the OP will make sure he extends the core plugin.