Ask Your Question
1

Dynamically generated Lookup Query

asked 2019-01-25 07:40:20 -0500

Ankesh  Mishra gravatar image

updated 2019-01-25 07:47:51 -0500

Can I use Jython Evaluator(or any other stage other than origin) to read from a file on Local FS/database and generate Lookup query dynamically? I tried doing it but the script doesn't parse because of lines like these

 tt = where_clause + isplit[0] + " ='${record:value('/" + isplit[0] + "')}' "
    else:
 tt = where_clause + isplit[0] + " ='${record:value('/" + isplit[0] + "')}' AND "

Error - Could not resolve implicit EL expression.... ....javax.servlet.jsp.el.ELException: No function is mapped to the name "record:value"

@metadaddy - Please see if you can help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-28 09:41:44 -0500

metadaddy gravatar image

The Jython script is called once per batch, and loops through the records in the batch, so the way to do this is:

# Assuming this is within the 'for record in records:' loop
tt = where_clause + isplit[0] + " = " + record.value[isplit[0]]
   else:
tt = where_clause + isplit[0] + " = " + record.value[isplit[0]] + " AND "
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-25 07:40:20 -0500

Seen: 51 times

Last updated: Jan 28