Link to home
Start Free TrialLog in
Avatar of kenmck
kenmck

asked on

How do you pass a numeric string value from one form to another form

I can pass two parameter (busgroup_id & dept_id) from one form to the next using the code below when the values are hard coded:

<td height="18"><font face="Arial, Helvetica, sans-serif" size="2"><a href="../document_view_gplist.cfm?busgroup_id=2&dept_id=17">HO</a></font></td>

What I would like to do is pass two parameters one of which is a numeric string, rsGroup__var3 (I would also be intrested in finding out how to do a text string) from one form to the next.

I have tried this code, without success:

<td height="18"><font face="Arial, Helvetica, sans-serif" size="2"><a href="../document_view_gplist.cfm?busgroup_id=#rsGroup__var3#&dept_id=17">HO</a></font></td>

Can anyone tell me how to do this?

Thanks,
Avatar of Scott Bennett
Scott Bennett
Flag of United States of America image

What you are trying should work, but make sure the variable name is correct and that you have <cfoutput> tags.


Like this:

<cfset rsGroup__var3 = 1>

<cfoutput>
<td height="18"><font face="Arial, Helvetica, sans-serif" size="2"><a href="../document_view_gplist.cfm?busgroup_id=#rsGroup__var3#&dept_id=17">HO</a></font></td>
</cfoutput>


Then on document_view_gplist.cfm you should be able to access the variable as #url.busgroup_id#
When ever you want to display the output of a variable use
<cfoutput>#var_name#</cfoutput>

and you dont have to worry about the numeric value suppose this is the test code

<cfset rsGroup__var3=4>

<td height="18"><font face="Arial, Helvetica, sans-serif" size="2"><a href="../document_view_gplist.cfm?busgroup_id=<cfoutput>#rsGroup__var3#</cfoutput>&dept_id=17">HO</a></font></td>

in document_view_gplist.cfm you can do this calculation


<cfset add=1+rsGroup_var3>
<cfoutput>#add#</cfoutput>

in case of text string here is eg

<cfset text_var="This is the test put as long as string here ">


<td height="18"><font face="Arial, Helvetica, sans-serif" size="2"><a href="../document_view_gplist.cfm?busgroup_id=<cfoutput>#rsGroup__var3#</cfoutput>&dept_id=17">HO</a></font></td>

in document_view.gplist.cfm file you just do

<cfoutput>#rsGroup_var3#</cfoutput>
you will get whloe text
Harry
ASKER CERTIFIED SOLUTION
Avatar of Scott Bennett
Scott Bennett
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial