troubleshooting Question

Passing array data to another page in Coldfusion

Avatar of ecpeel
ecpeel asked on
ColdFusion Language
33 Comments1 Solution1354 ViewsLast Modified:
Hello All,
Using Coldfusion...

IframeConsultant, (yes, IFRAME), contains

function to select a firm, after select a firm you may choose a consultant.
rather than store a consultant rate with the consultant information,
store the rate with the chosen consultant in an intersection (cross) table along with the orderid.

You can choose multiple consultants and assign each one a rate

Currently there's an array setup to grab the consultant id, already stored in tables and pass this info
to a function that updates the intersect table with orderid, consultantid.

All help appreciated - it's late so please ask questions I'm sure this sounds jumbled as it is.
I've added an input box to the looped array so there's a input field next to each new consultant selected for "rates".

as you choose a consultant a temparray is updated but nothing is "saved" to the table until you hit the save button.

The action on the save button is where I want to pass along my rates (in the looped array known as rate_#i#).

I need to pass the rates data to the "save" action(method) which is a looping tempArray populated if another function finds a 
consultantid and since my "rates" data is not a part of the array, (ok... time for some psuedo-code)

--- CFC that sends data to the CFC that populates the cross table
--- This is the last function

<cfif arrayLen( tempArray )>
	<cfloop from="1" to="#arrayLen(tempArray)#" index="i">

		<cfset updateOrder(arguments.orderid.getID(), tempArray[i], rate) />
The form stores all data into request scope so I end up with rate_1, rate_2, rate_3
which corresponds to consultant1, consultant2, ...

until I submit the page. All form vars are converted to request vars.

but how to get the rate form data to the last function and in proper order so it updates the proper consultantid/orderid/rates
row in the table.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 33 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros