?
Solved

CGGRID Mystery

Posted on 2011-04-26
4
Medium Priority
?
238 Views
Last Modified: 2012-05-11
Hi (again),
I have a CFGRID table that uses a remote cfc to populate it.  One of the columns I'd like to contain "Yes" or "No" (without the quotes).

No matter how I try, it display in the grid as "true" or "false" (without the quotes).  If I change the value to Yess or Noo it displays OK.

Has anyone heard of this or have a clue.  I dumped the query results and the QueryConvertForGrid results and everything looks good until the actual display?

Below is a section of code to give you the idea

Thanks again for your expertise,
hefterr

<cfloop query="getProds">
      <cfset queryaddrow(format)>
	    <cfset querysetcell(format,'Order',getProds.OrderId)>
        <cfset querysetcell(format,'ProdName',getProds.ProductName)>
        
        <cfif getProds.SubInd eq "true">
          <cfset YNsubInd = "Yes">
        <cfelse>
          <cfset YNsubInd = "No">  
        </cfif>
        
        <cfset querysetcell(format,'SubInd',YNsubInd)>
	    <cfset querysetcell(format,'Sdate',getProds.Sdate)>
	    <cfset querysetcell(format,'Edate',getProds.Edate)>

etc....
	    
        
        <cfset querysetcell(format,'QTY',getProds.QTY)>

Open in new window

0
Comment
Question by:hefterr
  • 3
4 Comments
 
LVL 1

Author Comment

by:hefterr
ID: 35470844
FYI.  Ifound this link with the same problem :
http://stackoverflow.com/questions/884474/cfgrid-boolean-column-as-yes-no

I can't believe ut's this complicated!!!!!

hefterr
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 2000 total points
ID: 35471822
Just taking a guess here, how about adding something to force it to think of Yes / No as strings instead of booleans.   Perhaps adding a space around the word?  " Yes " or  " No "  ? or a non-breaking &nbsp;  or an underscore "_Yes_"  ?   Something that that to fudge the results?
0
 
LVL 1

Author Comment

by:hefterr
ID: 35472256
@gdemaria,
I like the space around the " Yes " / " No " as this will appear as per specs.  I don't have access now so I'll try in the morning.  But it sounds promising.

hefterr
0
 
LVL 1

Author Closing Comment

by:hefterr
ID: 35474803
added a space before and after the yes/no and it worked fine.  Thanks for the clever solution!

hefterr
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question