We help IT Professionals succeed at work.
Get Started

CFMX 7: Flash Forms: Data Binding

Brian Coughter
on
262 Views
Last Modified: 2013-12-24
In the code below, I would like to bind the dynamically generated rate [  evaluate("Medical.#RateDed#")  ] to a <cfformitem type="text"> below the select box.  I also would like to bind another column in the Medical Query.  I need to know if and how that can be done.



QUERIES:
--------------------------------------------------------------------
<cfquery name="Employee" datasource="#Datasource#">
SELECT *
FROM Employees_NEW
WHERE GHRSSN = #Emp_SSN#
</cfquery>

<cfquery name="Medical" datasource="#Datasource#">
SELECT *
FROM Rates_New
WHERE Type LIKE 'HI_%'
   OR Type = 'waived'
ORDER BY ID
</cfquery>


CODE
-------------------------------------------------------------------
<cfselect name="Medical" label="Medical">
   <cfoutput query="Medical">
   <option label="#ID#" value="#ID#" <cfif Employee.Medical EQ '#ID#'>selected</cfif>>#Trim(Description)# - $#Trim(NumberFormat(evaluate("Medical.#RateDed#"),999.99))#</option>
</cfoutput>
</cfselect>
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 15 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE