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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pawe84
Creator
Creator

my own routine isn't shown in tmap expression builder under "user defined"

Hi everyone,

I created a routine which will return a result , see example below.

Now my issue: If I open tmap this routine isn't shown in expression builder under "User Defined".

Did I missed one step or is this function wrong?

 
package routines;

public class comparePriceList {
/**
     * Compare price list
          */
   
public double checkPrice (double weight) {
    
    double limit_2kg = 2.00;   
    double result = 0.00;
        if (weight <= limit_2kg) {
           result = 10.80;
        } 
        else {
           result =0.00;
         }
    
    return result;  
    
  }
}

 

Labels (1)
  • v8.x

1 Solution

Accepted Solutions
Shicong_Hong
Employee
Employee

Hello 

You need to specify this category value in the comments before the function. eg:

/**
* helloExample: not return value, only print "hello" + message.
*
*
* {talendTypes} String
*
* {Category} User Defined
*
* {param} string("world") input: The string need to be printed.
*
* {example} helloExemple("world") # hello world !.
*/
public static void helloExample(String message) {
if (message == null) {
message = "World"; //$NON-NLS-1$
}
System.out.println("Hello " + message + " !"); //$NON-NLS-1$ //$NON-NLS-2$
}

 

Regards

Shicong

 

View solution in original post

3 Replies
pawe84
Creator
Creator
Author

Ok even the routine isn't shown there I'm able to call it.

Shicong_Hong
Employee
Employee

Hello 

You need to specify this category value in the comments before the function. eg:

/**
* helloExample: not return value, only print "hello" + message.
*
*
* {talendTypes} String
*
* {Category} User Defined
*
* {param} string("world") input: The string need to be printed.
*
* {example} helloExemple("world") # hello world !.
*/
public static void helloExample(String message) {
if (message == null) {
message = "World"; //$NON-NLS-1$
}
System.out.println("Hello " + message + " !"); //$NON-NLS-1$ //$NON-NLS-2$
}

 

Regards

Shicong

 

pawe84
Creator
Creator
Author

Thanks, now it will show up.