Date Parameter in Freehand SQL Calculated Field

Gokul Devunuri shared this question 4 years ago
Answered

Hello YF Community,


I want to pass a User Prompt Parameter into a function.


I can use the Freehand SQL calculated to call the function but I'm not able to pass the parameter into freehand sql calculated field.


I have used Parameters in Pre defined/Simple calcualted fields but not in freehand sql.

Is it possible to do such thing in YF ? I keep getting invalid Month name or werid date error.


I need to pass a date (user prompt) into

function_name('Date parameter') - Freehand SQL calculated field


Thanks,

Gokul

Best Answer
photo

Hi Gokul,

You cannot use parameter value while creating a View.

I have replied back to you on the other ticket we were dealing with.

I will merge this ticket or may close this it.

Regards,

Mahesh

Replies (8)

photo
1

Hi Gokul,

Thanks for reaching us.

I am trying to find more information about this issue.

In the meantime can you please send me some screenshots of what you are trying to do.

Regards,

Mahesh

photo
1

I have tried creating Calculated field in View and Report and want to pass the date parameter as an input to the function.I'm able to use Selected_Date parameter in Pre Defined and Simple Calculated fields but not in Freehand SQL. I think the syntax is incorrect for the way I'm using it - Not sure

photo
photo
1

Hi Gokul,

Thanks for the screenshot, to use the parameter you need to type {?} in place of Selection_date.

See how you go with it and let me know if you have any questions.

Regards,

Mahesh

photo
1

Hello Mahesh,


Here is a much simpler calculated field.

I have created Number parameter in the view and I'm trying to use it in Calculated field.


CASE

WHEN {?} > 4 THEN 'True'

ELSE 'False'

END


I get "Missing IN or OUT parameter at index:: 1" error.


The SQL is validated if I use 'Number' or '{?}' but when I use the column in report, I get "ORA-01722: invalid number" Error becaues I'm comparing a string with a number - Either way, I'm not able to call the user prmpt parameter value into freehand SQL calculated field

photo
photo
1

Hi Gokul,

Sorry, I learn't from the developers that we cannot use parameters in the Calculated fields.

You may need to create a whole report using Freehand SQL.

Please let me know if you have any questions.

Regards,

Mahesh

photo
1

Hello Mahesh,


I have tried it in a simple freehand sql report and this is not working.

I have tried both

where request_id = {?} and

where request_id in ({?}) and I get the same error in both cases.

Missing IN or OUT parameter at index:: 1


I have tried different fields in the where clause and I get the same error.


We are using YF 7.4.9 version

photo
photo
1

Hi Gokul,

I found that you are trying to create a View and not a Report.

I have tested this on 7.4.9, creating a Report, please see the screenshot below:

/qwvZ868p4cH+yCHwBAbAAAAgEakd0YyRy9MTPz5N795e3p6fk8OhtgAAAAANKLp6Xn7g4UzZ97bq8wgiA0AAABAA5qeno9ETp858565BD+ewY7YAAAAAKAGYgMAAACAGogNAAAAAGogNgAAAACo4f8DUmChVz9qIfIAAAAASUVORK5CYIIA


Please let me know if you have any questions.

Regards,

Mahesh

photo
1

Hi Gokul,

You cannot use parameter value while creating a View.

I have replied back to you on the other ticket we were dealing with.

I will merge this ticket or may close this it.

Regards,

Mahesh

photo
1

Hi Gokul,

Hope you are doing well.

Can you please let me know if you have any questions?

Regards,

Mahesh

photo
1

Hello Mahesh,


Thanks for all the information.


You can close thi ticket

photo
1

Thanks Gokul.

Regards,

Mahesh

Leave a Comment
 
Attach a file