Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all previously I was using routines.utils.getNotes(SFOpportunities.Notes__c) to extract the values from field named Notes , length 32768 into next field with a lenght of 60 both string. and I am getting an error
Exception in component tMap_4
java.lang.StringIndexOutOfBoundsException: String index out of range: 60
at java.lang.String.substring(Unknown Source)
at routines.utils.getNotes(utils.java:571)
can anyone see this
in saleforce they have SOQL - https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm
in talend You can check real lengths, something like:
row1.col==null? null :StringHandling.LEN(row1.col)<60? row1.col :StringHandling.LEFT(row1.col, 60)
Hi
it means column shorter than 60, for example " "
check in source database MIN(lenght()) for column
Hi @vapukov thanks for reply, the source also has the field length as 32768 only,
do You check this by query? (not by definition)
You need any 1 rows shorter to have error
Hi @vapukov the source is Salesforce and I dont know much to query in that, I just work in Talend, can you please tell me about that
in saleforce they have SOQL - https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm
in talend You can check real lengths, something like:
row1.col==null? null :StringHandling.LEN(row1.col)<60? row1.col :StringHandling.LEFT(row1.col, 60)
I do understand your solution, meanwhile I used this
StringHandling.LEN(coLname)>58?colname.substring(0,58):colname
Is this fine?
The min lenght is 0 it is nullable, so I don't understand is then why do I get the error
it similar, I just add check for NULL