Date widget dynamic default value

  • Last update:  2021-10-08
  • I. Overview

    1. Problem description

    The date widget wants to set a default value based on the current time, such as the beginning and end of the month.


    2. Solutions

    Use date class functions to achieve.


    II. Example 

    1. Report design 

    Place two date widgets in the parameter panel, namely the start date and the end date.


    2. Start date setting 

    Select the start date widget, select the formula underAttributes>Advanced>Widget Value, and enter the formula: DATEINMONTH(TODAY(),1) , which means the first day of the month, as shown in the figure:


    3. End date setting 

    Select the end date widget, select the formula under Attributes>Advanced>Widget Value , and enter the formula: DATEINMONTH(TODAY(),-1) , which means the last day of the month, as shown in the figure:


    4. Effect preview

     

    III. Template download

    Click to download the template: Date_widget_dynamic_default_value.cpt

    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy