Skip to Content
avatar image
Former Member

Using scalar UDF in graphical calculation view

Hi

I need to filter records in a projection node of a graphical calculation view based on the financial year. So I have created a simple scalar UDF to return the start date of financial year as follows:

BEGIN

IFMONTH(CURRENT_DATE) > 6

THEN

r_date := CONCAT(YEAR(CURRENT_DATE),'0701');

ELSE

r_date := CONCAT(YEAR(CURRENT_DATE)-1,'0701');

ENDIF;

END;

My question is this: How can I call this function in the expressions editor to apply the filter?
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 17, 2016 at 10:21 AM

    Hello Mar,

    at the moment there exists no option to call own defined scalar UDFs in graphical calculation views.

    You have to use either a filter expression (which should work for your case) or you define a table UDF containing the logic to get and filter the data.

    Regards,

    Florian

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your response Florian. Here's how I solved it: created an input parameter from the scalar function in the calc view and used this input parameter in the filter expression :)

      capture.png (16.7 kB)