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)
Parameter needs to contain, not equal, user input.
raineyt
<p>I have a 12 digit asset tag that starts with a series of zeroes, like so:</p>
<p> </p>
<p>000000039182</p>
<p>000900458283</p>
<p>000003957178</p>
<p>etc.</p>
<p> </p>
<p>I've got my asset tag parameter working so that if the user enter in the whole number (including leading zeroes), the report will only show data for that tag.</p>
<p> </p>
<p>I'd like to set it up so that the user can enter in just the portion after the leading zeros, and still get what they're looking for. I've tried entering in *39182 but that doesn't work.</p>
<p> </p>
<p>What's the best way to set this up?</p>
Find more posts tagged with
Comments
jfranken
<div>Maybe something like this will work:</div>
<div> </div>
<div>var str = "000000000000" + params["asset_tag"].value;</div>
<div>var fullTag = str.substring(str.length - 12, str.length);</div>
<div> </div>
<div>it will fill the tag with leading 0's so that the result is always 12 digits.</div>
<div> </div>
<div>Regards,</div>
<div>Jeff</div>