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)
birt string match?
Arif shah
<p>Hi,</p>
<p> </p>
<p>I am trying the following syntax for matching a string against the column but its returning -1 no matter what I try. I have confirmed that the column does contain the mentioned string</p>
<pre class="_prettyXprint">
BirtStr.search("Off1",dataSetRow["Shift_Day"],2)
BirtStr.search("*Off*",dataSetRow["Shift_Day"],2)</pre>
<p>Can someone please check this and help me fix this</p>
<p> </p>
<p>Arif</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>Since you are not providing any data for Shift_Day, we cannot check the syntax you are using. However, I can tell you that in both cases, the pattern will be found starting at index 2 of the source string. Since it is a zero-based index, the results will be:</p>
<p> </p>
<p>-1 for Shift_day = "Offsite"</p>
<p>4 for Shift_day = "Day Off"</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>