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

dynamic href property in cfgrid?

Participant ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

is there a way to make this work? i'm trying to use different href values inside a cfgrid, based on the value returned by the query. for some reason, it always navigates to the second url, "someOtherURL". grid format is html

<cfgrid>

...

<cfif myQry.myColumn eq 'something'>

    <cfgridcolumn href="someURL">

<cfelse>

    <cfgridcolumn href="someOtherURL">

</cfif>

...

</cfgrid>

thanks a lot!

TOPICS
Advanced techniques

Views

577

Translate

Translate

Report

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
LEGEND ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

Take your if/else logic outside of the cfgrid tag so you can see what you are doing.  I solve these sorts of problems like this:

<cfif WhatIHave is WhatIExpect>

output yes

<cfelse>

output no and WhatIExpect and WhatIHave.

If WhatIExpect looks like WhatIHave, check for whitespace.

Votes

Translate

Translate

Report

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 ,
Jan 11, 2013 Jan 11, 2013

Copy link to clipboard

Copied

LATEST

thanks Dan, outside the grid works fine. the string returned is short and never contains white spaces. any other ideas?

Votes

Translate

Translate

Report

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
Documentation