Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Visible If stringX contains specific text
robertv41090
<p>Hey guys,</p><p> </p><p>I need a little help. I am being passed combinations of A, B, C and D (separated by commas) through a text parameter called StringX. </p><p>I am creating a grid with rows for A, B, C and D. I have the visibility for each row based on whether or not the value of StringX contains that letter. For instance:</p><p> </p><p>
</p><p>If StringX = A, B, C, D</p><p> </p><p>The grid should display:</p><p>A<br />
B</p><p>C</p><p>D</p><p> </p><p>
</p><p>If StringX = A, D</p><p> </p><p>The grid should display:</p><p>A</p><p>D</p><p> </p><p>
</p><p>If StringX = B, C</p><p> </p><p>The grid should display:</p><p>B</p><p>C</p><div> </div><div>=============</div><div> </div><div>What code should be in the visibility section for each of the rows? Right now I can get it working for the EXACT value of StringX, but not for the <span class='bbc_underline'>contents</span> of StringX.</div><div> </div><div>Any help is appreciated!</div>
Find more posts tagged with
Comments
micajblock
<p>The code should look something like this:</p><p> </p><div><pre class="_prettyXprint">var parmArray = params["pVisibility"].value.split(",")!(parmArray.indexOf("A") > -1)</pre></div><div>See attached example.</div>
robertv41090
<p>Dude, this is perfect. I cant thank you enough.</p><p> </p><p>Questions:</p><p> </p><p>1) I see the code in the XML Source, but can this be accessed anywhere in the property editor? Or, did you just type code directly into the XML Source? In other words - where in BIRT did you type the code above?</p><p> </p><p>2) Why didn't you use the visibility function? Just curious</p><p> </p><p>Thanks again for your time</p>
robertv41090
<p>nevermind #1. Found it!</p>
micajblock
<p>and I did use the visibility function. The code is expression builder of the visibility property.</p>