Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello.
I am new at this so apologies if this is toooo simple. I've searched and searched but can't seem to find an answer.
I am trying to do something like this....
var c = @row.areas.Count; var cl = "section"; if(@c == 3) { @cl = "sectionNarrow"; }
If I output the variables c and cl are fine until I do the if
c
cl
if
Help!
Hi Ian,
Try this:
var c = (int)row.areas.Count; var cl = "section"; if(c == 3) { cl = "sectionNarrow"; }
As you are using dynamic variable it needs to be cast to int.
Jeavon
Bingo!
Thanks. I was so close.... this works a treat.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Counting`
Hello.
I am new at this so apologies if this is toooo simple. I've searched and searched but can't seem to find an answer.
I am trying to do something like this....
If I output the variables
c
andcl
are fine until I do theif
Help!
Hi Ian,
Try this:
As you are using dynamic variable it needs to be cast to int.
Jeavon
Bingo!
Thanks. I was so close.... this works a treat.
is working on a reply...