Hi Neil, I have a feeling the output type of the .Length method might actually be a string, rather than an integer.
I have a feeling this is a long shot, and I haven't tried it but maybe you can prefix the "Escape:Text().Length" call with "Int:" to cast it that way? So ... <query valuea="*Int:*Escape:Text(<%txt_content%>).Length" operator=">" valueb="Int:10"> Might be worth a shot? Mark On Friday, 12 June 2015 09:32:41 UTC+1, Neil wrote: > > Hi > > I'm struggling to compare the length of a (string) text element. > > The following works to get a simple output, of, say, '20': > > Test: <%!! Escape:Text(<%txt_content%>).Length !!%> // Outputs '20'. > > But comparing below just outputs nothing: > > <reddot:cms> > <if> > <query valuea="Escape:Text(<%txt_content%>).Length" > operator=">" valueb="Int:10"> > <htmltext>------ Over 10 ------</htmltext> > </query> > <query type="else"> > <htmltext>----------Less than 10---------</htmltext> > </query> > </if> > </reddot:cms> > > I've tried changing the operator between '>', 'gt' and '>', but no joy > - am I missing something obvious here? > > Thanks > > Neil > -- You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to reddot-cms-users+unsubscr...@googlegroups.com. To post to this group, send email to reddot-cms-users@googlegroups.com. Visit this group at http://groups.google.com/group/reddot-cms-users. For more options, visit https://groups.google.com/d/optout.