none
Microsoft Project 2010 - set the custom field values to none RRS feed

  • Question

  • When I add a new custom field (duration) it shows "0 days" for all the task by default. Is it possible to change default "0 days" to none or blank.

    note: I do not want to change the lookup table values.

     

    HP

    Thursday, April 19, 2012 5:40 AM

Answers

  • Hi Harsh

    If the custom field is of duration type, then you can not change default "0 days" to blank or none.

    But yes you can use different type of custom field (If you have a Lookup Table).

    Thanks


    Manish

    Thursday, April 19, 2012 7:50 AM

All replies

  • Hi Harsh

    If the custom field is of duration type, then you can not change default "0 days" to blank or none.

    But yes you can use different type of custom field (If you have a Lookup Table).

    Thanks


    Manish

    Thursday, April 19, 2012 7:50 AM
  • If i may add to Manish answer, you can use a Text Custom field with lookup table and then you can set blanks and values of 1 days, 2 days Etc., but duration fields designed to have number of days/hours values...

    The problem with text field is you cannot use calculation like with duration field.

    This is why you can't use blank on duration field, you can't calculate numbers and text together (blank is like letters)


    Ofir Marco , MCTS P.Z. Projects

    Thursday, April 19, 2012 9:25 AM
  • Hi Ofir,

    I liked your resolution. Extending the suggestion of replacing a custom number field with null value if the value = <blank> (instead of having a zero number), what is the best formula? 

    we want to show the actual number if the value is non-zero. But, display a null value, if the value is zero.

    Thank you in advance..

    Thursday, April 3, 2014 3:56 PM
  • You could use a formula along the lines of

    iif([duration]<>0,[duration]," ")

    Basically, if the duration is not equal to zero, then set the text value to the duration, otherwise set it to " ".

    Note that duration is likely to be stored internally in minutes, so you could do the following instead

    iif([duration]<>0, projdatediff(start,finish,"standard")," ")

    which uses the projdatediff function to calculate the duration between the start and finish of the task, based on the standard calendar.


    Ben Howard [MVP] | web | blog | book

    Thursday, April 3, 2014 8:02 PM
    Moderator
  • Hi Manish

    You can use Ben's fornula (If you want the Duration field values), you can also add a text part to display the units that you want to show, for example:  & " Days"

    iif([duration]<>0, projdatediff(start,finish,"standard")," ")  & " Days"

    Because the text field gives calculations in minutes you have an alternative option, instead of projdatediff function to multiply in a value that fits the units that you want to show.  

    For example, if you want to display days then multiply 60*8  (if your calendar is 8 hours of work per day).

    60 minutes per hour, 8 hours per day => Days.

    And then it will look like:

    iif([duration]<>0, [Duration]*480," ")  & " Days"


    Ofir Marco , MCTS P.Z. Projects

    Sunday, April 6, 2014 5:35 AM
  • Or you could used the [minutes per day] field, which will be default use the standard calendar, and so the formula looks like

    iif([duration]<>0, [Duration]*[minutes per day]," ")  & " Days"


    Ben Howard [MVP] | web | blog | book

    Sunday, April 6, 2014 7:30 AM
    Moderator
  • Even better :)

    Ofir Marco , MCTS P.Z. Projects

    Monday, April 7, 2014 6:43 AM