Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

<cflocation url="">

Participant ,
Sep 08, 2009 Sep 08, 2009

Good morning,

I know I should try this before posting but, is this possible?

<cfif Not IsDefined = "#FORM.TagNumber#">

<cflocation url = "holds.cfm">

</cfif>

Does this make any sense?

Thanks in Advance,

DJ Khalif

1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 08, 2009 Sep 08, 2009

This is my cfparam:

<cfparam name="#FORM.ORDNO#">

This is my cflocation:

<cfif IsDefined("#FORM.ORDNO#")>
<cflocation url="/index.cfm">
<cfelseif Not IsDefined("#FORM.ORDNO#")>
<cflocation url="/testpages/testurlholds.cfm">
</cfif>

Cfparam has nothing to do with it. You twice repeated the mistake I pointed out. Use the variable name, that is, without the # symbol. Also, give the variable in cfparam a default value. Something like this

This is my cfparam:

<cfparam name="FORM.ORDNO" default="">

<cfif IsDefin

...
Translate
Participant ,
Sep 08, 2009 Sep 08, 2009

<cfif Not IsDefined ("#FORM.TagNumber#")>

<cflocation url = "holds.cfm">

</cfif>

<cfouput>#FORM.TagNumber#</cfoutput>

Ok,

This does not work. I'll get back later.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 08, 2009 Sep 08, 2009

<cfif Not IsDefined("FORM.TagNumber")>

<cflocation url = "holds.cfm">

</cfif>

It's about the name of the variable, not the value.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 08, 2009 Sep 08, 2009

This is my result:

Element ORDNO is undefined in FORM.

This is my query:

<cfquery name="rsORDNOSearch" datasource="atDat">
SELECT AMFLIBQ.ORDNO, AMFLIBQ.FITEM, CD_COMDTA.LPITEM, CD_COMDTA.LPSTAT, CD_COMDTA.LPMODL
FROM AMFLIBQ INNER JOIN CD_COMDTA ON AMFLIBQ.FITEM = CD_COMDTA.LPITEM
WHERE AMFLIBQ.ORDNO LIKE 'M%#FORM.ORDNO#0'  AND CD_COMDTA.LPSTAT = 'A'
</cfquery>

This is my cfparam:

<cfparam name="#FORM.ORDNO#">

This is my cflocation:

<cfif IsDefined("#FORM.ORDNO#")>
<cflocation url="/index.cfm">
<cfelseif Not IsDefined("#FORM.ORDNO#")>
<cflocation url="/testpages/testurlholds.cfm">
</cfif>

Could my cflocation be too far down in the page? It comes after the query but before my form.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 08, 2009 Sep 08, 2009

I was trying this with too much information but, I searched some more and found this to work.

<cfif IsDefined("FORM.ORDNO")>
<cfelse>
<cflocation url="/Production/workordersearch2.cfm">
</cfif>

This way no can open the production page in error.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 08, 2009 Sep 08, 2009

Better still would be:

<cfif NOT IsDefined("FORM.ORDNO")>

     <cflocation url="/Production/workordersearch2.cfm">
</cfif>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 08, 2009 Sep 08, 2009

BKBK and Dave,

Thanks for the help. BKBK, I tried to use your method but, I kept using <cfparam>, which caused more problems than, solutions. Once I took it out, it work but by that time I added <cfelse>. As long as it worked, I was happy. I may decide to rid code of that <cfelse>, later.

Thanks again,

DJ Khalif

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 08, 2009 Sep 08, 2009

This is my cfparam:

<cfparam name="#FORM.ORDNO#">

This is my cflocation:

<cfif IsDefined("#FORM.ORDNO#")>
<cflocation url="/index.cfm">
<cfelseif Not IsDefined("#FORM.ORDNO#")>
<cflocation url="/testpages/testurlholds.cfm">
</cfif>

Cfparam has nothing to do with it. You twice repeated the mistake I pointed out. Use the variable name, that is, without the # symbol. Also, give the variable in cfparam a default value. Something like this

This is my cfparam:

<cfparam name="FORM.ORDNO" default="">

<cfif IsDefined("FORM.ORDNO")>
<cflocation url="/index.cfm">
<cfelse>
<cflocation url="/testpages/testurlholds.cfm">
</cfif>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 08, 2009 Sep 08, 2009
LATEST

BKBK,

Thanks again. I did drop the cfparam and have accomplished my goal. I may go back to it later.

Thanks again,

DJ Khalif

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources