Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Newbie question about syntax documentation

I've looked around and found the documentation for components but what about the syntax
for the talend functions in the expression builder? I can't find anything that lists the functions and their
syntax to know what goes in each parameter. The help box describes it but doesn't actually show the syntax.
If I understand correctly it's basically java if you choose that as your project language right?
Labels (3)
23 Replies
Anonymous
Not applicable
Author

Most recent error after removing semicolons per shong, but not checking null values yet. (i have all the columns set to nullable in tmap):
For input string: "Dur."
Exception in component tMap_1
java.lang.NullPointerException
at otstest.otsimport_0_1.OTSImport.tFileInputDelimited_1Process(OTSImport.java:3647)
at otstest.otsimport_0_1.OTSImport.tFTPGet_1Process(OTSImport.java:448)
at otstest.otsimport_0_1.OTSImport.runJobInTOS(OTSImport.java:4826)
at otstest.otsimport_0_1.OTSImport.main(OTSImport.java:4728)
3647: OTSCallDetail_tmp.Commission = OTSCallDetail.Revenue * .4;
448: tFileInputDelimited_1Process(globalMap);
4826: tFTPGet_1Process(globalMap);
4728: int exitCode = OTSImportClass.runJobInTOS(args);
Now looking at the code i see a potential problem in that Commission is a calculated value.
From the lines before 3647:
OTSCallDetail_tmp.Revenue = (row2.call2.equalsIgnoreCase("Complete")) ? routines.BillCalc.revenue
(OTSCallDetail.Minutes, OTSCallDetail.Rate, OTSCallDetail.call1): 0;
There's an underlined yellow error saying that OTSCallDetail can only be null at this location.
Am I missing something on calculating values? Can you not reference a value in the same output row?
I was thinking that it started with the first column of each row and did the processing so that by the time i get to the last
column i can reference the previous one for a calculation.
Anonymous
Not applicable
Author

You cannot reference an output column in another output column. If you don't want to repeat the code, use tmap variables.
Anonymous
Not applicable
Author

row2.call2.equalsIgnoreCase("Complete")

This kind of tests can become safe to null values this way :
"Complete".equalsIgnoreCase(row2.call2)

Because the String "Complete" will never null and the method equalsIngoreCase handle a null parameter.
Anonymous
Not applicable
Author

ok. so if i need to calculate something I do it in a variable? the commission is based on revenue that's based on billable minutes that is calculated with a java routine.