Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
triciagdaly
Contributor III
Contributor III

Defaulting a multi box date value when opening a document

I would like to default a multi box date value field to the weekstart of this week.  I've looked into using a macro from OnActivateSheet Trigger but unable to get the syntax correct, and thinking there must be an easier way.  Attached is a screen shot of the multi box properties, and a portion of the screen showing the two values.  I'd like to default to the start of this week (07/14/2014) when opening the document.

1 Solution

Accepted Solutions
Not applicable

Hi Tricia,

You can still add a "Select in Field" trigger to the OnActivateSheet.

Then under Field, type your date fieldname: Inv_RptWeek

and under Search String, type: =Date(WeekStart(Today()), 'M/D/YYYY')

Hope this helps.

View solution in original post

4 Replies
Not applicable

Hi Tricia,

You can still add a "Select in Field" trigger to the OnActivateSheet.

Then under Field, type your date fieldname: Inv_RptWeek

and under Search String, type: =Date(WeekStart(Today()), 'M/D/YYYY')

Hope this helps.

PradeepReddy
Specialist II
Specialist II

1) While Opening a Document

     Doc Properties-->Triggeres-->OnOpen-->SelectInField

      FieldName : Date_Field

      FieldValue: date(WeekStart(Date_Field))

2) On sheet Activation

    SheetProperties-->Triggers-->OnActivateSheet--->SelectInField

    FieldName : Date_Field

    FieldValue: date(WeekStart(Date_Field))

triciagdaly
Contributor III
Contributor III
Author

I tried this and when refreshing or opening the sheet, date is not appearing.

Not applicable

Could be a formatting of date issue.

Are your dates within this field formatted same way as provided in the search string ?