Salesforce

Can't call a function from a query WHERE clause.

« Go Back

Information

 
TitleCan't call a function from a query WHERE clause.
URL NameP146428
Article Number000150654
EnvironmentProduct: OpenEdge
Version: Progress 8.x, 9.x
OpenEdge 10.x, 11.x
OS: All Supported Operating Systems
Other: N/A
Question/Problem Description
Can't call a function from a query WHERE clause.

Calling a user defined function from a where clause doesn't fire the function.
Steps to Reproduce
Clarifying Information
Functions only fire once when used in a WHERE clause.

UDF doesn't fire when used in query predicate.

Function not firing in WHERE Clause.
Error Message
Defect Number
Enhancement Number
Cause
When an ABL predicate (such as a WHERE clause) contains a user-defined function, the AVM evaluates the function once-when it opens the query or enters the FOR EACH block.   

For example; if the function returns a hard coded value like TRUE or 1, the WHERE clause will resolve to <field-name> = TRUE|1, otherwise the query will not be resolved and no records will be returned.
Resolution
Resolve the value of the function prior to using it in the query predicate.
Workaround
Notes
References to Written Documentation:
OpenEdge Development, ABL Reference, "FUNCTION Statement"
Keyword Phrase
Last Modified Date5/21/2024 6:08 AM

Powered by