Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Monday, April 11, 2016

Maximo automation script... Jython code similar to string Starts with


from psdi.util.logging import MXLogger
from psdi.util.logging import MXLoggerFactory
from psdi.mbo import MboConstants

logger = MXLoggerFactory.getLogger("maximo.script");
siteVar=str(mbo.getMboValue("SITEID"))
## Below line does action similar to starts with in string. It compares if site variable starts with KSK or not, if it doesnt start it alerts the user
if(siteVar[:len("KSK")] <> "KSK"):
 logger.debug("Site validation")
 errorgroup = "Site"
 errorkey ="Checksite"


ref : Reference Link


----------------------------------------------------------------------------
 All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Thursday, November 13, 2014

How to convert a string value to double in Birt report.


In the below example i am converting a string(UPPER) attribute to double value to perform so math calculations.

row["ASSETNUM"]=Double.parseDouble(mainDataSet.getString("ASSETNUM"));


----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.