Skip to main content

Populate Current "weekId" in GI Parameters

  • March 3, 2021
  • 1 reply
  • 346 views

greglang
Varsity I
Forum|alt.badge.img+1

Does anyone know a workaround to populate the current or last WeekID (EPTimeCard.WeekID) in a parameter on a GI.  I have a few use cases for this and in order to use the GI’s for Dashboards I need this filter to be applied.   As a workaround I know I can use weekstart as its a field on EPTimeCard but this is less user friendly as users would be able to pick dates other than week start dates from the dropdown.

 

For example you can use @today or  @weekstart-1 for a specific date field but I have been unable to figure out the logic to do this for a WeekID if its even posable.

 

Thanks in advance for any suggestions.   Attached is a GI I’m using to show missing timecards.

1 reply

lauraj46
Captain II
Forum|alt.badge.img+9
  • Captain II
  • March 24, 2021

@greglang 

Although not available as a field on the GI Conditions tab, the EPTimeCard table includes a calculated data field named Week Start Date.  After you add this field to the Results Grid in your GI, it should be available on GI saved filters or in the Filter Settings on a dashboard widget.  You should be able to use @WeekStart for the other side of the filter condition.

Here is an screenshot that shows how it would look if applying the filter on the dashboard widget directly:

I imagine there could be some performance impact to using this method if the filter is applied after the all of the data is already retrieved from the server.  

Laura