Skip to Content

Passing default values in the View

Hello Everyone,

Kindly let me know how I can pass default values esp current date time to input parameters in the view

I am referring the CAP documentation but unable to find the syntax for passing the default value to the input parameter

entity SomeView ( someDate: datetime default $now )
as SELECT * from Employees where joiningDate <= : someDate;

Thanks in advance.



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 22, 2020 at 08:41 AM

    Default values for parameters are available yet. If they come, in exactly the way you write.

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks, Christoph for your revert. I am trying to pass the current date as default value in the view but unfortunately got the syntax error. Just want to clarify is CAP support default value for the input parameter in a view or not.

      Thanks once again for your assistance

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.