Jeff, so what you are saying is using the databaseblocks component
create the query for the list instead of going right from the table? 
Sounds like it should work.  I will give it a try.

Thanks


On Wed, 16 Feb 2005 17:42:38 -0500, Jeff Fleitz <[EMAIL PROTECTED]> wrote:
> Not sure whether I understand you, but maybe you should try using a custom 
> query that uses an outer join to the lookup
> you are talking about and reference it in the query attribute of the 
> DisplayList tag. Then test to see if the column
> value is null, and display the link accordingly.
> 
> Will that work?
> 
> Jeff
> 
> Dirk Marshall wrote:
> > That concept works but I am unsure how to get the variable I need to 
> > evaluate.
> >
> > This is the variable that is in the link as displayed between the
> > displaylistlinks tag
> > #Attributes.listQuery.TableName_FieldName[currentRow]#
> >
> > I need to know if that variable is "" or has data
> >
> > This variable is in the link as the record key to link to the lookup
> > table but if I try to access this variable in any other way than in
> > the specific link format it throws an error saying attributes is
> > undefined. From what I can interpret the entire link text is pulled
> > into the cf_displaylistlinks tag and passed to the cf_displaylist
> > where it is evaluated and the link is passed back.
> >
> > Thanks
> >
> > On Wed, 16 Feb 2005 14:20:07 -0500, Adam Churvis
> > <[EMAIL PROTECTED]> wrote:
> >
> >>Like this:
> >>
> >>--------------------------------------------------------------------
> >><!--- Create a UDF that returns either a hyperlink or an empty string,
> >>depending upon your criteria --->
> >><cffunction name="IsLink" access="public" returntype="string" output="No">
> >><cfargument name="arg1" type="numeric" required="yes">
> >><cfargument name="arg2" type="string" required="yes">
> >><cfargument name="arg3" type="date" required="yes">
> >>
> >><cfset var myLink = "">
> >>
> >><cfif Arguments.arg3 GT Now()>
> >> <cfset myLink = "[<a href='cfmpage.cfm'>Click Me</a>]">
> >></cfif>
> >>
> >><cfreturn myLink>
> >></cffunction>
> >>
> >><cfmodule template="#Request.adminLayout#/Header.cfm" pageType="Database">
> >>
> >><cf_DisplayList table="SomeTable" rowsPerPage="50" label="Example"
> >>displayALinkToThisSearchForm="No">
> >><cf_PrimaryKey primaryKeyColumn="SomeColumn" primaryKeyType="integer">
> >>
> >><cf_DisplayColumnInList column="AnotherColumn" label="Ex2"
> >>type="varchar(80)">
> >><cf_DisplayColumnInList column="YetAnotherColumn" label="Ex3"
> >>type="datetime">
> >>
> >><cf_DisplayListLinks add="AddForm.cfm" view="No" edit="EditForm.cfm"
> >>delete="DeleteForm.cfm">
> >> [<a href="AList.cfm?FromDrill=1">Something</a>]
> >>
> >> <!--- Call the UDF in the Caller scope --->
> >> #Caller.IsLink(arg1, arg2, arg3)#
> >></cf_DisplayListLinks>
> >></cf_DisplayList>
> >>
> >><cfmodule template="#Request.adminLayout#/Footer.cfm">
> >>------------------------------------------------------
> >>
> >>Let me know how that works for you.
> >>
> >>Respectfully,
> >>
> >>Adam Phillip Churvis
> >>Member of Team Macromedia
> >>http://www.ProductivityEnhancement.com
> >>
> >>Download Plum and other cool development tools,
> >>and get advanced intensive Master-level training:
> >>
> >>* C# & ASP.NET for ColdFusion Developers
> >>* ColdFusion MX Master Class
> >>* Advanced Development with CFMX and SQL Server 2000
> >>
> >>----- Original Message -----
> >>From: "Dirk Marshall" <[EMAIL PROTECTED]>
> >>To: <[email protected]>
> >>Sent: Wednesday, February 16, 2005 1:34 PM
> >>Subject: [plum] Display link
> >>
> >>
> >>>I am sure there is a simple solution to this I just can't see it at
> >>>the moment.  I have a link in a list that is a drill down to another
> >>>table.  I want to hide that link for a record if there is no value in
> >>>the linked field otherwise an error comes up if the link is clicked.
> >>>The linked lookup field value may not be filled in when the record is
> >>>created as it might not be known yet.  Anyway within the
> >>>cf_displaylistlinks tag I have the following link
> >>>
> >>>[<a
> >>
> >>href="#Application.absoluteUrlRoot#/admin/UDOZoneCodes/UDOZoneCodesList.cfm?
> >>UDOZoneCode=#URLEncodedFormat(Trim(Attributes.listQuery.ADD_ZoneInfo_UDOZone
> >>Code[currentRow]))#&FromDrill=1">UDO
> >>
> >>>Zone Codes</a>]
> >>>
> >>>
> >>>I thought I would just wrap the link in an if statement doing a check on
> >>
> >>the
> >>
> >>>Attributes.listQuery.ADD_ZoneInfo_UDOZoneCode[currentRow] variable
> >>>
> >>>However it appears that variable is put together in the displaylist
> >>>tag and has to be in the link format to be recognized.  How do I get
> >>>that variable value to validate if it has a value or not?  I guess I
> >>>really just need to know what scope the variable is in to be able to
> >>>find it.
> >>>
> >>>Thanks
> >>>
> >>>Dirk
> >>>
> >>>**********************************************************************
> >>>You can subscribe to and unsubscribe from lists, and you can change
> >>>your subscriptions between normal and digest modes here:
> >>>
> >>>http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> >>>**********************************************************************
> >>>
> >>
> >>**********************************************************************
> >>You can subscribe to and unsubscribe from lists, and you can change
> >>your subscriptions between normal and digest modes here:
> >>
> >>http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> >>**********************************************************************
> >>
> >
> >
> > **********************************************************************
> > You can subscribe to and unsubscribe from lists, and you can change
> > your subscriptions between normal and digest modes here:
> >
> > http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> > **********************************************************************
> >
> >
> 
> **********************************************************************
> You can subscribe to and unsubscribe from lists, and you can change
> your subscriptions between normal and digest modes here:
> 
> http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> **********************************************************************
>

**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:

http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************

Reply via email to