Access a Flag from Task view in a Resource View

S

sherain

Hi I've created a flag in the Task view so I can flag some tasks for certain
conditions. I would like to access this flag in the resource view so I can
only have the flagged tasks listed for the resource. How do I do this?

Thanks
 
J

JulieS

Hi Sherain,

Please see FAQ # 51 "Data Types: Task, Resource and Assignment" at:

http://project.mvps.org/faqs.htm

for an explanation about the relationship between Task fields (your
flag1 field), Resource fields, and assignment fields. What I believe
you wish to do is show the task flags in assignment fields in the
Resource Usage view.

The URL below shows some sample VBA code from fellow MVP Jack Dahlgren
to copy data from a task to an assignment:

http://masamiki.com/project/macros.htm

See the link for "Copy Task Fields"

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 
S

sherain

Hi JulieS, thank you the macro worked great. However, I'm now into another
problem. I created a resource filter to filter only on the flag I want and
it works when I'm in the Resource Usage view. I then created a Report using
this filter however, when I run the report it tells me it has no data to
print. I'm not sure what I'm doing wrong.

Thanks
 
J

JulieS

Hi Sherain,

Glad to know Jack's macro did what you needed it to do and thanks for
the feedback.

To your next question:

You don't post what your filter definition is, but I assume you are
filtering the Resource Usage view for assignments with Flag = "yes" and
I also assume that in order to get the Resource's names to appear when
you run the filter in the Resource Usage view, you selected "Show
related summary rows" in the filter definition.

As noted in FAQ #51, if you apply a filter to the Resource Usage view,
the filtered results will show when the assignment Flag1 is set to
"yes", even though the filter is actually a resource filter and should
only work on Resource Flag1 field.

Without knowing your specific filter definition and what report you are
trying to run, I can say that yes, filters applied to reports do not
always work the same way as filters applied to views. Is it possible to
filter the Resource Usage view and print that?

Give us some more details about your filter definition and what report
you are trying to print and we'll be happy to try help sort it out.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 
S

sherain

Julie, we have a template for an implementation that is reusable as new
clients wish to join our service. We are now trying to dice/slice the plan
so that we have an idea of work and cost if only certain implementation
aspects are selected by a client. So for example, if they wish to use our
Performance Test environment, then I have used Flag 1 to flag all tasks that
are required to set a client up in our Perf environment. I have then been
able to create filters/reports for my management to use to determine the cost
and resources for only this service from a Task perspective. My manager now
wants this information from a resource perspective in a report so that she
can distribute. So for example for an Operations Analyst, show all tasks
that they are involved in when connecting a client to the Perf environment
with a total for work and cost. I have used the macro to populate the
Resource Flag1 with the information from the Task Flag1 and created a
resource filter, PerfEnv, "Flag1 equals Yes". The filter works well in the
Resource Usage view except the summary information still reflects all tasks.
I am now trying to create a Custom Resource report with Table = Summary and
Filter = PerfEnv and in the Details tab requested Totals and Cost Rates.
When I run this report I am receiving a message that there is no data to
print and I am now stuck.

I hope I have given you sufficient information to help me out.... many thanks.

Sherain
 
J

JulieS

Hi Sherain,

Wow, thanks for the detailed explanation, it really does help!

I think a couple of the problems you are having is due to a
misunderstanding about what Jack's macro did and how project treats
fields. When you ran Jack's macro, you actually copied the Flag1 data
from the Task Flag1 field to the *Assignment* Flag1 field, not the
Resource Flag1 field. The assignment Flag1 field will only show when
you are working with either the Resource Usage view or the Task Usage
view. That's why the filter you created (PerfEnv) works in the Resource
Usage view -- it's able to filter for the *Assignment* flag1 field =
"yes" even though it is a *Resource* filter.

To see the problem you hare having, show the Resource Sheet view and
apply the Summary table to the view. Add the Flag1 field to the table
and you will see that none of your resources have Flag1 set to "yes".
Now, when you run your PerfEnv filter, you will see no resources listed.
The filter is looking for *Resource* Flag1 = Yes not *Assignment* Flag1
= yes. So, when you attempt to create a new Resource Report using the
Summary table and the filter, there are no resources returned and no
data to print.

A possible workaround that may solve the problem - being able to print
something for your manager that will show her:
1. Resources who are assigned to "Perf Environment" flagged tasks
2. Total work for those resource assignments
3. Total cost for the Perf Environment tasks

1. Display the Resource Usage view and create a copy of the Usage table.
(View > Tables > More Tables, select the Usage table and Copy.)
2. Name the new table to your liking and apply the table to the view.
3. Add the Flag1 field, the Cost field, and the Work field to the table.
4. Apply the "PerfEnvironment" filter you created.

That should now only show those *assignments* that you have set Flag1 =
yes. The problem is, the Work field and Cost fields are still showing
the totals for the Resource.To fix that, we'll create a custom group
that will summarize only the work and cost for the filtered tasks.

5. Create a new group (Project > Group by > More Groups > New). Name
the group as you like and set the following definition:

Check off "Group assignments, not resources" checkbox.

First Row
Group by:
Field Name: Flag1
Field Type: Assignment
Order: Ascending or descending (doesn't really matter because there is
already a filter applied that only shows "yes" flags)

Second Row
Then by:
Field Name: Name
Field Type: Resource
Order: Ascending or Descending as you need.

6. Apply the Group to the filtered view. This should now show the work
and cost summarized by Resource for only the "Perf Env" assignments.

7. Drag the timescaled portion (right side) to the far right to hide it.
Adjust columns etc. as needed and print the view. I'm afraid no
"report" will give you what you need, but the advantage of printing the
view is that if you have a program that creates PDF files, you can
create a PDF file by simply printing the view.

You may even chose to go so far as to create a view to make it easier to
switch in and out of the view. Go to View > More Views. In the More
Views dialog box, the Resource Usage view should be selected. Click the
Copy button and rename the view to one of your liking. You should see
in the view definition dialog box the table, and group applied. I
noticed the "PerfEnv" filter was not listed in the view definition
eventhough it was applied. If you like the view, I would also add it to
your template.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 
S

sherain

Julie, thank you very much. Did exactly what I wanted and I learned
somethings along the way.

Sherain
 
J

JulieS

You're very welcome Sherian. Glad to have helped and thanks for the
feedback.

Julie
Project MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top