Custom fields and Formula. Formula isn't showing what I want it to

B

Bud

Hello,

I went out on the web and found some explanations for the iif function but
no real good examples for what I want to do.
I want to take the status field and display stop light indicators instead of
using the status indicator field. I created a field using Number1 and entered
the following formula.
IIf([Status]=val("Late"),1,IIf([Status]=val("Future
Task"),2,IIf([Status]=val("Complete"),3,4)))
For graphical indicators I said equals 1 and selected the red stop light,
for 2 the yellow stop light, for 3 green just to play around with that for
now.

Can someone tell me what I am doing wrong because the numbers it brings back
in the number1 custom field is 1 for tasks with complete in the status field,
4 for all other non summary tasks with Late and Future task in the status
field and than 0 for summary tasks?

I was expecting a 1 for Late, a 2 for Future task, a 3 for Complete, and a 4
if it didn't find any of those.

Is there a web site with good examples of formulas? I already looked at
Mike's tutorials.

Thanks
 
D

Dale Howard [MVP]

Bud --

The Status field actually contains numeric data, in spite of the fact that
you see text data displayed in the field. Therefore, the number code
contained in the Status field is as follows:

0 = Completed
1 = On Schedule
2 = Late
3 = Future Task

Based on this information, you should now be able to write a formula that
works. Hope this helps.
 

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