On the initial load, nothing in the grid is selected - so the text defaults 
to "Pending".  I would like to have it initially blank like the others until a 
row in the grid is selected.  I also have some other areas that I want to use 
the same logic but there are more than two options.  So, I wanted to learn 
more about the inline if then statements so I would know how to do that in the 
future.

Thanks,
Tim


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
John Ivanoff
Sent: Friday, August 19, 2005 8:48 AM
To: [email protected]
Subject: Re: cfgridcolumn

Tim, you're not wanting to display "pending" in the grid?

Mark, That was the article I did see it in. In fact I've taken take article 
and have added a bunch of bells and whisles to it.



On 8/18/05, Tim Starling <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> I started rewriting the code for the page today to use the code  like 
> the example they give.  I've actually had that article on printed out 
> on my desk but just hadn't read to that point until you guys pointed 
> it out.  There just doesn't' seem to be a way to get the same results 
> directly in the cfgridcolumn tag
> 
>   
> 
> Here is a sample of the line that is working for me so far. 
> 
>   
> 
> <cfformitem bind="{(AccountBalance.selectedItem.PostStatus
> == 2 ? 'Aproved' : 'Pending')}" type="text" />
> 
>   
> 
> Is there a good tutorial on how to do inline if statements?   I would like
> to be able to have the code do the following: if 1 then Pending, If 2 
> then Approved, else "".
> 
>   
> 
> Thanks everyone for your help on this – I think I am 90% where I want 
> this to be.
> 
>   
> 
> Tim
> 
>   
>  
>  ________________________________
>  
> 
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Mark Moore
>  Sent: Thursday, August 18, 2005 8:48 PM
> 
>  To: [email protected]
>  Subject: Re: cfgridcolumn
>  
> 
>   
>  
>  
> 
> John,
>  
> 
>   
>  
> 
> I saw a nice example of the inline if at CFDJ on an example for an 
> address book.  The IF statement is on page two of the article at:
> http://cfdj.sys-con.com/read/101342_2.htm   It looks like
> the idea in the previous email is correct but the syntax may be off.  
> Check out the article and maybe it will help...
>  
>  
> 
> ----- Original Message -----
>  
> 
> From: John Ivanoff
>  
> 
> To: [email protected]
>  
> 
> Sent: Thursday, August 18, 2005 8:47 AM
>  
> 
> Subject: Re: cfgridcolumn
>  
> 
>   
> 
> I couldn't get the inline if to work either so I'm going to change my  
> position. Can I do that?
>  Would it be better to change the 1 to Approved in the query? I was  
> also wondering if that approved can be changed to pending in the form,  
> it needs to be converted to a 2 or is the grid just used as a list?
>  Maybe add a table with approved and pending in it and tie it to the  
> main table and rewrite the query.
>  I think in the long run it'll be easier to maintain.
>  
>  I thought I saw the inline in the MX7 WACK but maybe I saw it used in CFDJ.
>  
>  
>  On 8/17/05, Tim Starling <[EMAIL PROTECTED]> wrote:
>  > Thanks for looking - it didn't like the quotes either.
>  >
>  > -----Original Message-----
>  > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf  > Of John Ivanoff  > Sent: Wednesday, August 17, 2005 9:18 PM  
> > To: [email protected]  > Subject: Re: cfgridcolumn  >  > I'll take a 
> look in the morning. try quotes around the number 1, maybe  > it's a 
> "string."
>  >
>  > On 8/17/05, Tim Starling <[EMAIL PROTECTED]> wrote:
>  > > On the original code I get this error:
>  > >
>  > > You must specify the name of a column in the query "qFundsAvailable"
> for
>  > the
>  > > {(Status.text == 1 ? 'aproved' : 'pending')} attribute of the 
> CFGRIDCOLUMN  > > tag.
>  > >
>  > > SO, I changed the Status.text to PostStatus.text to match the 
> column in  > the  > > database and I get the same error.
>  > >
>  > > You must specify the name of a column in the query "qFundsAvailable"
> for
>  > the
>  > > {(PostStatus.text == 1 ? 'aproved' : 'pending')} attribute of the  
> > > CFGRIDCOLUMN tag.
>  > >
>  > > Would you mind looking in your book the next time you have a chance? 
> And
>  > > which book are you looking in?  Thanks for your help!
>  > > Tim
>  > >
>  > > -----Original Message-----
>  > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> On Behalf  > > Of John Ivanoff  > > Sent: Wednesday, August 17, 2005 
> 7:58 PM  > > To: [email protected]  > > Subject: Re: cfgridcolumn  > >  
> > > try this. it's an in line if, I'm not 100% of the syntax since I 
> don't  > > have a book in front of me.
>  > >
>  > > <cfgridcolumn name="{(Status.text == 1 ? 'aproved' : 'pending')}" 
> />  > >  > > On 8/17/05, Tim Starling <[EMAIL PROTECTED]> 
> wrote:
>  > > >
>  > > >
>  > > >
>  > > > Hi everyone,
>  > > >
>  > > >
>  > > >
>  > > > I am working on a page that will show people the transactions 
> that they  > > have  > > > made in their account.  I want to use 
> cfgrid in a flash cfform and the  > > > cfgridcolumn tags to display 
> the data.  I can get the data from the  > > database  > > > and 
> display it in the grid fine.  However, in a couple of the columns I  > 
> > use  > > > 1's and 2's to instead of "Approved" or "Pending".  Does 
> anyone know of  > a  > > > way to take the 1 or 2 that is returned and 
> do something like a cfswitch  > > > cfcase to display "Approved" or 
> "pending" instead of "1" or "2"?
>  > > >
>  > > >
>  > > >
>  > > > My current code is below:
>  > > >
>  > > >
>  > > >
>  > > >                                     <cfgrid
> query="myQuery"
>  > > > rowheaders="no" name="AccountBalance">  > > >  > > >  > > > 
> <cfgridcolumn name="PaymentDate" header="Payment Date" mask="MMMM DD,  
> > > YYYY"
>  > > > />
>  > > >
>  > > >
>  > > > <cfgridcolumn name="Amount" header="Amount" type="currency" >  
> > > >  > > >  > > > <cfgridcolumn name="Type" header="Payment Type" />  
> > > >  > > >  > > > <cfgridcolumn name="PayMethod" header="Payment 
> Method" />  > > >  > > >  > > > <cfgridcolumn name="PostStatus" 
> header="Status" />  > > >
>  > > >                                     </cfgrid>
>  > > >
>  > > >
>  > > >
>  > > >
>  > > >
>  > > > The column that I would like to switch is PostStatus.  I've 
> looked all  > > > afternoon and haven't been able to find anything.  
> Any help would be  > > > appreciated.
>  > > >
>  > > >
>  > > >
>  > > > Thanks,
>  > > >
>  > > > Tim
>  > > >
>  > > >
>  > > >
>  > > >
>  > >
> ----------------------------------------------------------
>  > > To post, send email to [email protected]  > > To unsubscribe:
>  > >    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>  > > To subscribe:
>  > >    http://www.dfwcfug.org/form_MemberRegistration.cfm
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
> ----------------------------------------------------------
>  > > To post, send email to [email protected]  > > To unsubscribe:
>  > >    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>  > > To subscribe:
>  > >    http://www.dfwcfug.org/form_MemberRegistration.cfm
>  > >
>  > >
>  > >
>  >
> ----------------------------------------------------------
>  > To post, send email to [email protected]  > To unsubscribe:
>  >    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>  > To subscribe:
>  >    http://www.dfwcfug.org/form_MemberRegistration.cfm
>  >
>  >
>  >
>  >
>  >
>  >
>  >
> ----------------------------------------------------------
>  > To post, send email to [email protected]  > To unsubscribe:
>  >    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>  > To subscribe:
>  >    http://www.dfwcfug.org/form_MemberRegistration.cfm
>  >
>  >
>  >
>  ----------------------------------------------------------
>  To post, send email to [email protected]  To unsubscribe:
>     http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>  To subscribe: 
>     http://www.dfwcfug.org/form_MemberRegistration.cfm
>  
>
NŠ²Û×j)¢Xµ×qû¢¸¢é¹»®&†Û×qû¢¸~Š1ézµ²ær¸yÇN‹nlj·¶Úuü~订¹zf­ŠËj؝Ç
______________________________________
This E-Mail was sent with MailMax/WEB.
http://www.smartmax.com



----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: 
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: 
   http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to