String index out of range

Error:

 

I was creating a map and was mapping my primary key so that Adeptia inserts a new record if it doesn’t find the records with specific field values and updates if it has. Bellow is the map and query. But when I try to save it it says ‘String index out of range: -1’. What am I doing wrong?

WHEN CONDITION{DBQuery {'select CLIENTHCPLOCATIONID,CLIENTHCPID from HCP_STAGE where CLIENTHCPLOCATIONID = $Input_TEST_FERRING_HCP_STAGING_UPLOAD_TXT_SCHEMA/Root/Record/ClientHCPLocationID and CLIENTHCPID = $Input_TEST_FERRING_HCP_STAGING_UPLOAD_TXT_SCHEMA/Root/Record/ClientHCPID' ,$var1 ,'true' } = ''} VALUE=[DBQuery {'select HCP_STAGE_SEQ.nextval from dual' ,$var1 ,'true'} ] OTHERWISE VALUE=[DBQuery {'select max(HCP_STAGE_ID) from HCP_STAGE where CLIENTHCPLOCATIONID = $Input_TEST_FERRING_HCP_STAGING_UPLOAD_TXT_SCHEMA/Root/Record/ClientHCPLocationID and CLIENTHCPID = $Input_TEST_FERRING_HCP_STAGING_UPLOAD_TXT_SCHEMA/Root/Record/ClientHCPID' ,$var1 ,'true' } ]

Cause:

Generally that error indicates an issue with your textual rule.

Solution:

Try storing the db queries within local variables

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.