using a formula in a customized field...syntax problem?

R

R.Scott Fleming

I have created a formula in a customized field to collect costs in the Task
table. I want to be able to apply a factor to the cost of a “labor†resource
and not to a “material†resource. I thought I could get it to work by using
one or the other of the following syntax statements:

IIf([Resource Type]="Work",[Cost]*(1+1.64),0)

IIf([Type]="Work",[Cost]*(1+1.64),0)

The above syntax statements did not work. The way I got it to work was to
insert a name in the Resource table in the Resource Group field called
“Supplier†for material. I then used the following syntax:

IIf([Resource Group]<>"Supplier",[Cost]*(1+1.64),0)

My problem is that basically I am lazy and don’t want to have to type in the
text “Supplier†in the resource group field for my materials on the project.


Any thoughts on what I might be doing wrong?
 
R

R.Scott Fleming

Thank you Trevor!

Well, maybe I am not using it correctly, because I am in the task area where
I am trying to collect and view this information in one easy tabulated view.
I assume by your response that there is not a way, while in the task table,
I can pull in resource information?

Thank you again for your information!!


Trevor Rabey said:
Of course you are doing this in the Resource Sheet, where the Resources are,
not the Gantt Chart where the Tasks are.
The first formula won't work because [Resource Type] is not the correct name
of the field.
The second should work with the correct test in the IIF().

The test in the IIF() should be for
[Type]=0 or [Type]=1

Check that the test works first with a formula in a Flag field:
IIf([Type]=0,Yes,No)

Resources will cost $0 unless/until they are assigned to a Task.

Trevor RabeyTrevor Rabey 0407213955 61 8 92727485 PERFECT PROJECT PLANNING
www.perfectproject.com.au
R.Scott Fleming said:
I have created a formula in a customized field to collect costs in the Task
table. I want to be able to apply a factor to the cost of a "labor"
resource
and not to a "material" resource. I thought I could get it to work by
using
one or the other of the following syntax statements:

IIf([Resource Type]="Work",[Cost]*(1+1.64),0)

IIf([Type]="Work",[Cost]*(1+1.64),0)

The above syntax statements did not work. The way I got it to work was to
insert a name in the Resource table in the Resource Group field called
"Supplier" for material. I then used the following syntax:

IIf([Resource Group]<>"Supplier",[Cost]*(1+1.64),0)

My problem is that basically I am lazy and don't want to have to type in
the
text "Supplier" in the resource group field for my materials on the
project.


Any thoughts on what I might be doing wrong?
 

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