Jump to content
  • 0

Set Search Date Criteria Begin and End dates as weekly blocks (current week), by default


Question

Hi, 

I don't know if this is possible but I need to set Search date criteria Begin and End dates as weekly blocks (current week), by default. Meaning, the 'Begin Date' of the criteria has a default of the Sunday before (or on) the current date and the 'End Date' has a default of the Saturday after (or on) the current date. 

I'm using a Pivot Table to show totals over a workweek period, using a 'ServiceDate' date field for the columns. The user needs to see just the current week (7 days) so I have 'ServiceDate' in the Search or Filter section, with criteria for 'Begin Date' and 'End Date.' The user could type in the previous Sunday's date (the Begin Date) and the following Saturday's date (the End Date) to filter the results by that week. However, I need this to happen automatically when the datapage is loaded. 

I imagine you could populate the 'Begin Date' and 'End Date' criteria by either External Parameters or Default Values but I can't figure out how to calculate the Sunday-through-Saturday dates based on the current date. Any help would be really appreciated-- 

EDIT: duplicate post, something was wrong with the Forums when I posted this and it kept repeating without confirming the thread was submitted.

Edited by DesiLogi
Duplicate Post
Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @DesiLogi,

As I understand, you would like to display the results or records for the current week upon loading. You don't need to calculate for the Start Date to be Sunday and End Date to be Saturday. You may use Current Week for the Comparison Type:

current week.png

Then, if you still need to have search form, you can add new criteria. The Logic will be:

Criteria_new.png

 

Hope this helps.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...