You can try an "if fdmContext["CATNAME"] == x" statement, not sure if that will work in your script. I am assuming this is a Logic Account based on the "RESULT = " statement in your script and I'm not sure if this will work in a Logic Account function or not as I haven't tested it.
Here is a roundabout way in case the more straightforward one suggested above does not work:
You can connect to the FDMEE Schema and get the category key from the tpovcategory table.
SELECT catkey FROM tpovcategory WHERE CATNAME = 'x'
as long as your category name is the same across environments, it should work fine.
We are following the same issue.
Do you have any practical example of how to launch such a query from within the function (Jython script) of a logic account?
Here is the solution:
import java.sql as jsql
import java.lang as lang
driver, url, user, passwd = ("oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@host/servicename","userid","password")
c = jsql.DriverManager.getConnection(url,user,passwd)
s = c.createStatement()
sql_stmt = "SELECT CATKEY FROM XXXXX.TPOVCATEGORY WHERE CATNAME = 'XXXXX'"
print "executing " , sql_stmt
rs = s.executeQuery(sql_stmt)
catKey = rs.getString("CATKEY")
if (strCatKey == catKey and StrPerKey[0:3] == "Jun" or strCatKey== catKey and StrPerKey[0:3] == "Dec"):
RESULT = CURVAL
RESULT = "Skip"