Function definitions in customized fields

A

Andrew K

I expected that NOW() would return the current date in a Date field. It
doesn't, either plain or in square brackets. Where can I find a complete
list of these functions with their definitions and usage?
 
J

John

Andrew K said:
I expected that NOW() would return the current date in a Date field. It
doesn't, either plain or in square brackets. Where can I find a complete
list of these functions with their definitions and usage?

Andrew,
The syntax for custom field functions, methods, etc. used to be easily
accessible via the "Help" button at the bottom of the Custom Field
Definition window in Project versions prior to 2003 - although I found
the syntax explanation was often lacking. For Project 2003 (and possibly
with 2002) that information has been moved. Use the Project Help file
and search for "functions".

With regard to your question on the "Now" function. It does return the
current system date when used in a formula in a spare customized field.
For example the following will put the current date (and time if that
display option is active) in the Date1 field:
Date1 = Now().

Functions cannot be used in standard date fields (e.g. Start, FInish,
etc.) however they can be included in a VBA macro that modifies the data
in those fields.

Hope this helps.
John
Project MVP
 
A

Andrew K

Thanks, John. I've put NOW() in the formula window of a Date field, but the
current date doesn't display. What setting am I missing?
 
J

John

Andrew K said:
Thanks, John. I've put NOW() in the formula window of a Date field, but the
current date doesn't display. What setting am I missing?


Andrew,
You're welcome. The most likely cause, (if the word "ERROR" didn't
appear in the field column), is that Project is not set for automatic
calculation. Either hit "F9" (manual calculate) or go to
Tools/Options/Calculation tab and set calculation to automatic.

Hope this helps.
John
Project MVP
 
A

Andrew K

Calculation mode is Automatic. Here's something to think about -- I was
trying to make this work in a master schedule built on a common resource
pool. And I just tried it in a stand-alone project, and it works fine.

Many thanks.

Andrew
 
J

John

Andrew K said:
Calculation mode is Automatic. Here's something to think about -- I was
trying to make this work in a master schedule built on a common resource
pool. And I just tried it in a stand-alone project, and it works fine.

Many thanks.

Andrew


Andrew,
It should still work. My standard test file is a dynamic master. The
master is the pool for the subprojects. However I'm not real clear on
what you mean by, "... a master schedule built on a common resource
pool." I guess I would say my master is built "on" a common resource
pool because it is the resource pool, but perhaps you mean something
different and since the formula is not working for you in your master, I
guess I need more details.

John
Project MVP
 
A

Andrew K

John,

Working fine. I put DateDiff("d",Now(),[Finish]) into a customized Number
field and based a filter on it. And, yes, what I call a master is the same
as your resource pool. Thanks for staying with this.

Andrew
 
J

John

Andrew K said:
John,

Working fine. I put DateDiff("d",Now(),[Finish]) into a customized Number
field and based a filter on it. And, yes, what I call a master is the same
as your resource pool. Thanks for staying with this.

Andrew


Andrew,
You're welcome. I'm glad you got it working and I appreciate the
feedback.

John
 

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