Example Code from MS doesn't work?

M

Mark Langendoerfer

This code is from the Sample site that ships with Project Server 2003. And
the white indicator shows #Error. I looked at the sample site and it gives
the same #Error. Anyone know what the problem is?

Switch(Len(CStr([Baseline Finish]))<3,"No baseline",([Work]+1)/([Baseline
Work]+1)>1.2,"Overbudget by 20% or more",([Work]+1)/([Baseline
Work]+1)>1,"Overbudget",True,"Under budget")
 
J

JackD

It works for me. Is there a baseline set for the task? If not then you would
expect to get an error.
-Jack
 
M

Mark Langendoerfer

I was under the impression that it was supposed to show the white indicator
if there was no baseline saved?

Switch(Len(CStr([Baseline Finish]))<3,"No baseline",

JackD said:
It works for me. Is there a baseline set for the task? If not then you would
expect to get an error.
-Jack


Mark Langendoerfer said:
This code is from the Sample site that ships with Project Server 2003. And
the white indicator shows #Error. I looked at the sample site and it gives
the same #Error. Anyone know what the problem is?

Switch(Len(CStr([Baseline Finish]))<3,"No baseline",([Work]+1)/([Baseline
Work]+1)>1.2,"Overbudget by 20% or more",([Work]+1)/([Baseline
Work]+1)>1,"Overbudget",True,"Under budget")
 
J

JackD

Hmm...

That isn't the test I'd use for no baseline.

Try this sort of test instead:

Switch([baseline finish]>50000, "No Baseline",

You can find out why this test works at my website:

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

-Jack


Mark Langendoerfer said:
I was under the impression that it was supposed to show the white indicator
if there was no baseline saved?

Switch(Len(CStr([Baseline Finish]))<3,"No baseline",

JackD said:
It works for me. Is there a baseline set for the task? If not then you would
expect to get an error.
-Jack


message news:[email protected]...
This code is from the Sample site that ships with Project Server 2003. And
the white indicator shows #Error. I looked at the sample site and it gives
the same #Error. Anyone know what the problem is?

Switch(Len(CStr([Baseline Finish]))<3,"No baseline",([Work]+1)/([Baseline
Work]+1)>1.2,"Overbudget by 20% or more",([Work]+1)/([Baseline
Work]+1)>1,"Overbudget",True,"Under budget")
 
B

Brian K - Project MVP

This code is from the Sample site that ships with Project Server 2003. And
the white indicator shows #Error. I looked at the sample site and it gives
the same #Error. Anyone know what the problem is?

Switch(Len(CStr([Baseline Finish]))<3,"No baseline",([Work]+1)/([Baseline
Work]+1)>1.2,"Overbudget by 20% or more",([Work]+1)/([Baseline
Work]+1)>1,"Overbudget",True,"Under budget")
Try thisone:
IIf([Baseline Finish]=ProjDateValue("NA"),"No baseline",IIf(ProjDateDiff
([Baseline Finish],[Finish])/480>=5,"Late by more than 5 days",IIf
(ProjDateDiff([Baseline Finish],[Finish])/480>0,"Late","On schedule")))
 

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