Web Apps – Show more rows in the Timecard Grid

Out of the box, Web Apps is set to show 10 rows in the timecard grid and then start paging. This was done for the sake of performance, but the paging was proving to be cumbersome for our employees.

If you only want to show 35 rows or less, you can easily change this setting in SL itself with no coding necessary.

Just go to Control Parameter Maintenance (PA.CNT.00) and pull up the following:

Where you see the ’35’ in Control Data, you will most likely see ’10’. Just make the change and hit save. Simple as that! You may need to log out and back into Web Apps to see the change take effect.

What’s that? 35 isn’t enough??? You may be tempted to put a higher number, but it won’t work (yet.)

I’ll show you how to increase by changing the web apps code, but please bear in mind, that you will experience some slight delays in loading the grid initially. However, our employees were OK taking the initial loading hit if it meant they didn’t have to search through pages to find the project they wanted…it’s a fine line to walk to find the right balance – you’ll have to make that call yourself after some testing. (I actually made some other enhancements to the grid loading process to improve the performance; I can get a 100 row timecard to fully load in around 3 seconds.)

Open your Web Apps solution and go to your Project Controller.  You’ll want to search (ctrl+F) for the sub InitializeSession

There is a Try / Catch block at the beginning that we are going to edit.  The code uses Get_PJCONTRL ,which is how Microsoft checks values in Control Parameter Maintenance for settings, to assign the value to ProjectTimecardUIHelper.PFTDetailPageCount .  You can see in the ElseIf section that if you have a number greater than 35, it’s set back to 35.  

You could comment out the whole If statement, but to prevent someone from setting too high, you should just edit the If statement to increase the 35 to a number that makes more sense.  I went with 100.  Again, you may want to keep a lower number for performance reasons.  I also increased the assignment in the Catch from 5 to 100 in case an error was encountered during assignment.  

    ProjectMenuHelper.GetMenuData(activeViewData, activeSession)
    ProjectTimecardUIHelper.PFTDetailPageCount = Integer.Parse(UIHelper.Get_PJCONTRL("WA", "GRID-TIMECARD-LINES", UIHelper.LoginSession).Trim) ' set number of grid lines

    If ProjectTimecardUIHelper.PFTDetailPageCount < 0 Then
        ProjectTimecardUIHelper.PFTDetailPageCount = 1
    'msde 8/12/18 increased from 35 to 100
    'ElseIf ProjectTimecardUIHelper.PFTDetailPageCount > 35 Then
    '    ProjectTimecardUIHelper.PFTDetailPageCount = 35
    ElseIf ProjectTimecardUIHelper.PFTDetailPageCount > 100 Then
        ProjectTimecardUIHelper.PFTDetailPageCount = 100
    End If

Catch ex As Exception
    'msde 8/12/18 increased from 5 to 100
    'ProjectTimecardUIHelper.PFTDetailPageCount = 5
     ProjectTimecardUIHelper.PFTDetailPageCount = 100
End Try

You’ll need to rebuild and deploy Web Apps for these changes to take effect. Have fun!

Feel free to share...

Leave a Reply

Close Menu