CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Form Name

Print topic Send  topic

Author Message
fcy
Posted: 04/09/2002, 10:21 PM

Is ther a varible that will give me the Form Name? I'd like to be able to use the name of a form on a page in a sql stmnt.
Alex Alexapolsky
Posted: 04/10/2002, 1:27 AM

Take a look at the generated code, should be smth like sFormName
fcy
Posted: 04/10/2002, 2:30 PM

thankalex but I need a little more help.

I have several forms on the page and am trying to use each forms name in it's where clause. If I hard code the value it works but if I try to use the sForm it does not and returns all records. ASP + Templates...here is what I have.

' Display Grid Form
'-------------------------------
Sub about1_Show()
'-------------------------------
' Initialize variables
'-------------------------------
Dim rs
Dim sWhere : sWhere = ""
Dim sOrder : sOrder = ""
Dim sSQL : sSQL = ""
Dim sFormTitle: sFormTitle = ""
Dim HasParam : HasParam = false
Dim iRecordsPerPage : iRecordsPerPage = 20
Dim iCounter : iCounter = 0

SetVar "TransitParams", ""
SetVar "FormParams", ""


sWhere = " WHERE FormID like '%" & sForm & "%'"

'-------------------------------
' Build base SQL statement
'-------------------------------
sSQL = "select [D].[Content] as D_Content, " & _
"[D].[DocumentID] as D_DocumentID, " & _
"[D].[FormID] as D_FormID, " & _
"[D].[Title] as D_Title " & _
" from [Documents] D "
'-------------------------------
Nicole
Posted: 04/11/2002, 1:41 AM

Hello,
sAction and sForm variables are empty when you load the page first time. They are using to determine what action is to be done: insert/update/delete/cancel (i.e. what button was hit) and for what form on the page. They get the values after you submit the form.
You can test it, click on any button on one of the records form on the page and you'll see the action name and form name.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.