Is there a way to get current weekID in a Generic Inquiry?
Hi All,
I want to add a condition to a generic inquiry to filter timecards created on last week. To do that I think that I would need to compare EPTimeCard.WeekID with current WeekId. Is there a way to populate Value field of GI with current WeekID ?
Thanks
Page 1 / 1
@charithalakshan49 I don’t think we can get the WeekID value in the Generic Inquiry but can get the StartWeek OR EndWeek like below.
@Naveen Boga Thank you. I will try it.
This formula will generate a WeekID. It uses DateAdd() and DayOfWeek() to get last week’s Monday, then uses that Monday to calculate the week number.
The formula cannot be used as a default value in a GI parameter, however it CAN be used as a GI condition or the default value in a report parameter.
Brandon, for some reason I can’t send Screenshots in a DM so here is what I was trying to send to you. I think the part your missing is a table with week Start. I use the CustomWeek table. EPCustomWeek and link it on WeekID
I created 2 hidden Parameters and one that is a combo box for the 3 choices I'm giving them (This week, Last week or All Timecards)
Then on the Conditions tab I tell it match the EPCustomWeek.StartDate to
the Parameter for @WeekStart if they choose the combo value of Current (This Weeks Timecards). or @WeekStart-1 if they choose the combo value Last (LastWeekStart) or if they choose All (All Timecards) it will not filter the weeks at all.