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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
bnichol
Specialist
Specialist

User Defined Function

Is there a way that I can create a public function in the "Edit Modules" section, so that it can be called as an expression.

When I try this, I get the error "Bad function name" in the Edit Expression window.

Any suggestions?

B

2 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

did you name your macro? p.e. Sub MyFunction ... End Sub - you can enter Macros and use them in the script either or in the objects.

Otherwise you can enter function as a variable and use them like fields.

bnichol
Specialist
Specialist
Author

I've defined the function like...

Public function test1(mbName)
...
test1 = false
end function

The function returns a boolean and I'm trying to use it in a Calculation Condition.