locked
Unable to find over allocated assignment for a resource - PS2013/PS2010 (VBA Code Optional) RRS feed

  • Question

  • A very interesting scenario. I would too the whether the task is overallocated with resource/time/work. The graphical icon in Indicator can be view pictorial by an human. whereas as in Robot(VBA Code) requires a field to identify whether the task is overloaded.

    A simple project with two tasks (T2 & T3) has same start date and assigned to same person. Why is it Overallocated field in respective row showing Over-allocated as No. {I am sorry guys, i am a beginner for Project Server}.

    Screenshot 1:

    Now i will show you the resource usage view why isnt showing overloaded for T2 & T3.

    Screenshot 2:


    I would to check the task level whether the task is overloaded or not. Show in screenshot1, i would see the overloaded value in some field. so i can write VBA code based on this field.

    Things which i tried are below:

    I have written a VBA code to read all tasks and in each task go to all assignments and check each assignment whether it is overloaded. Even this approach didnt work for my scenario.

    PFB for VBA pseudocode.

    For Each t In ActiveProject.Tasks
            For Each assign In t.Assignments
                If assign.Overallocated = True Then
                    Resource_OverLoadText = Resource_OverLoadText + assign.ResourceName + ", "
                End If
            Next assign
    Next t
    
    MsgBox (Resource_OverLoadText)

    Let me know if you need more information to understand my scenario.

    ----

    Murali Krishna


    Monday, December 12, 2016 11:48 AM

Answers

  • Murali,

    As your Screenshot 2 shows, it is the resource - not the task or the assignment - which is over-allocated, and this is the typical use case for Project's resource leveler.

    The red human icon on a resource indicates that the resource is overallocated within at least one time interval.  The red human on the task indicates that one of the resources demanded by the task is overallocated within the time interval covered by the task.  To re-create the information of these icons with vba, you need to examine the time phased data.  I would suggest taking a look at resource.timescaledata.

    Rod Gill's book provides a good introduction.  An older edition of the chapter is here.


    Tuesday, December 13, 2016 2:07 PM