You could create a list out of your keys then set OK=true, loop thru your
list saying <cfif (not structkeyexists(request.datastruct, thislistitem)) or
(request.datastruct[thislistitem] eq "")><cfset OK = false></cfif>

But if I were you I'd just leave it as it was ;-)

----- Original Message -----
From: "Deanna Schneider" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 22, 2002 6:53 AM
Subject: huge CFIF - better way?


> Hi Folks,
> I'm building an multi-part form, at the end of which, if someone has
filled
> out all the required stuff, they can download an XML file generated from
> what they've filled in. I don't want to let them download the XML file
until
> everything is complete, so right now I'm doing the following. But, it
seems
> like there should be a better way, and I'm too tired today to think of it.
> Thoughts? (CF 5.0)
>
> <!---Make sure everything required has been filled in.--->
> <cfif structkeyexists(request.datastruct, "assetid") AND
> request.datastruct.assetid is not ""
> AND
> structkeyexists(request.datastruct, "title") AND request.datastruct.title
is
> not ""
> AND
> structkeyexists(request.datastruct, "description") AND
> request.datastruct.description is not "" AND
> structkeyexists(request.datastruct, "version") AND
> request.datastruct.version is not ""
> AND
> structkeyexists(request.datastruct, "statusid") AND
> request.datastruct.statusid is not ""
> AND
> structkeyexists(request.datastruct, "keywords") AND
> request.datastruct.keywords is not ""
> AND
> structkeyexists(request.datastruct, "formatid") AND
> request.datastruct.formatid is not ""
> AND
> structkeyexists(request.datastruct, "location") AND
> request.datastruct.locationid is not "">
>
> <!---Everything Required is Done--->
>
> <p><a href="writefile.cfm">Download Your XML File.</a></p>
>
> </cfif>
>
>
> Deanna Schneider
> Interactive Media Developer
> [EMAIL PROTECTED]
>
>
>
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to