Jump to content
  • 0

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


DesiLogi
 Share

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 comment
Share on other sites

2 answers 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 comment
Share on other sites

  • 0

Hi LittleMsGinger,

Thanks for the help with this. I did find the Current Week criteria and that does work well to bring up the current week. The problem is that the user might want to scroll before weeks and I think that locks you into the current week. If there's a way to have it open to the current week as per above but then be scrollable, by the week, to previous weeks, that's what I need. Thanks again for the help, though, much appreciated!

Link to comment
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...
 Share

×
×
  • Create New...