Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Label's Visibility: set True when field is not null
MOnita
<p>Hi! I'm working on a single cell in which I'm displaying some info. I'm trying to validate the string lenght of one of my fields of the binding column in order to display the label if the value of the row is not null or in this case the string lenght of it is bigger that 0. </p>
<p> </p>
<p>if (BirtStr.charLength(row["SACCION_ASF"])>0){false} else {true};</p>
<p> </p>
<p>The thing is it seems that even they are in the same cell it is never getting the value of the row...because each time it doesn´t render. </p>
<p> </p>
<p>What I'm doing wrong?</p>
<p> </p>
<p>Thank you in advanced</p>
Find more posts tagged with
Comments
Matthew L.
<p>I wonder if it's the data type for "SACCION_ASF" is effecting the BirtStr.charLength() command?</p>
<p>Do you have an example that you can share, to see if I can determine the cause of the issue?</p>
<p>Or can you modify my attached example to reproduce the issue?</p>
<p> </p>
<p>In my own test on a string data type this same command worked for me:</p>
<pre class="_prettyXprint">
if(BirtStr.charLength(row["STATE"]) > 0){false;}else{true;}
</pre>
<p>Another command that also works for me is the following:</p>
<pre class="_prettyXprint _lang-js">
if(!row["STATE"]){true;}else{false;}
</pre>
<p>I've attached an example that has a test label's visibility set with the commands above to demonstrate.</p>
<p> </p>
MOnita
<p>Well in my Cell I'm putting both: the Label and my row["FIELD"]: dataSetRow["SACCION_ASF"]</p>
<p> </p>
<p>The problem is that in the expression Builder where I want to write this expression: <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">if (BirtStr.charLength(row["SACCION_ASF"])>0){false} else {true};</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">the DataSet or bindings that are related to </span>dataSetRow["SACCION_ASF"] doesn't appear...I'm writing the dataSetRow["SACCION_ASF"] directly... I guess that's not right. What can I do?</p>
JFreeman
<p>If you haven't bound the element to the data set where that row exists, it will not be accessible even if you manually code it.</p>
<p> </p>
<p>Can you bind the element to the data set that contains that row?</p>