Share via

Adding a Task Field to a Resource Usage view

Anonymous
2013-10-27T02:11:41+00:00

I have a simple Resource Usage view that I want to share with the Resources (the project team) so they can stay alert to their upcoming tasks.

It would be great to add a couple of columns:

   - The Task ID (so they can go back to the Gantt chart and locate the task if they want to), and

   - The list of all the Resource Names that work on that task - the list of people they will have to collaborate with in order to get that task accomplished.

The problem is that those two are Task fields, and they do not appear as options when creating a new column in the Resource Usage view.

Is there a way, even if it involves VBA, to get those Task fields to show in the Resource Usage view?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

John Project 49,710 Reputation points Volunteer Moderator
2013-10-27T02:25:53+00:00

Ben,

Sure, go to the MVP website at: http://project.mvps.org/faqs.htm, and take a look at FAQ 37 - Custom fields in views.

Hope this helps.

John

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. John Project 49,710 Reputation points Volunteer Moderator
    2013-10-27T19:01:38+00:00

    Ben,

    Okay, I didn't remember what field was used in the example in FAQ 37 but to be precise, it's still not "out of the box". How about we say it's "directly per the FAQ code".

    With regard to further automation, it may be possible to use an Event based macro. An Event macro fires when some event occurs. For example, you can set up a macro to run when a file is opened or closed. In your specific case it looks like the ProjectBeforeAssignmentChange Event might be what you would need. I copied the following example from Project's VBA help file.

    Example

    This example examines any new resource assignments and cancels them if they are for the specified resource. This example requires a new class module and additional code for it to have an effect. 

    <br>Visual Basic for Applications
    Private Sub App_ProjectBeforeAssignmentChange(ByVal asg As Assignment, ByVal Field As PjAssignmentField, _<br><br><br>    ByVal NewVal As Variant, Cancel As Boolean)<br><br><br><br> <br><br><br><br><br>    If Field = pjAssignmentResourceName And NewVal = "Lisa Jones" Then<br><br><br>        MsgBox "Lisa is no longer available for assignment!"<br><br><br>        Cancel = True<br><br><br>    End If<br><br><br>End Sub

    However, setting up an event triggered macro requires a little more than simply using the above code. You need to create a class module. You can read more about it in the VBA help file, and/or take a look at Jack Dahlgren's website at: http://masamiki.com/project/project\_open.htm

    Hope this helps.

    John

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-10-27T18:19:34+00:00

    With NO modification in fact - I had already defined Task-Text1 to be what I needed (Task-ResourceNames), so I just ran the macro as it was written and this set the Assignment-Resource-Text1 variable to that same value. Right "out of the box", in this specific case :-)

    Still, it does demand that I re-run the macro every time I change resource assignments, etc. Is there any way of defining Assignment-Resource-Text1 to be some kind of a function that itself looks up the value of the corresponding Task-Text1 and so have the program take care of the updating?

    Thanks for your support and your follow-up, John. Regards,

    Ben

    Was this answer helpful?

    0 comments No comments
  3. John Project 49,710 Reputation points Volunteer Moderator
    2013-10-27T16:19:46+00:00

    Ben,

    You're welcome and thanks for the feedback.

    Just for reference, "works out of the box" normally means it will do what you want with the basic application (i.e. out of the box), and no customization or programming required. I'll assume you meant that the macro referenced in the FAQ worked with minor modifications.

    John

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-10-27T14:23:33+00:00

    Thank you very much for your prompt response, John, it worked right out of the box!

    Regards,

    Ben

    Was this answer helpful?

    0 comments No comments