Skip to Content
0

Using scalar UDF in graphical calculation view

Oct 17, 2016 at 05:17 AM

166

avatar image
Former Member

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?
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Florian Pfeffer
Oct 17, 2016 at 10:21 AM
1

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

Show 1 Share
10 |10000 characters needed characters left 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)
0