Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
khouloudgh
Contributor
Contributor

how can i create a custom function with specific parameter

how can i create a function that have in her parameter a specifiq numbere that i will use in my sql statement 

my_function( int a )

sql select  * from my table where  shamp = a }

endFuction 

this my principe any help 

3 Replies
Mauritz_SA
Partner - Specialist
Partner - Specialist

khouloudgh
Contributor
Contributor
Author

i need to call my function in the editor expression to charge only the variable i need 

Mauritz_SA
Partner - Specialist
Partner - Specialist

So do you mean in the front end (because then you can't use SQL)? What exactly would you like to do?

You can create a variable as well if you want to and pass it a parameter. For example:

In script:

Set CustomFunction = $1*2;

Or in front end:

Create variable called CustomFunction2 with value $1*3

Then $(CustomFunction(3)) will return 6. $(CustomFunction2(3)) will retun 9.