Forum Discussion

Toxicboumboum's avatar
Toxicboumboum
Copper Contributor
Jan 08, 2021

Create a custom field with Project creation date

Hello Everyone,

 

In Project Server, I'm trying to build a view and in this view, I'd like to group my projects by date of creation (MM/YY), so to that, I write a foncion but I'm not able to use the [Created] with my custom field, I performed some tests with Year([Created]) but it returns empty value all the time,

so in my custom field formula I just added: [Created] and the result is the same, it returns no value

But where this thing is pretty weird is when Iadd the column created in my view, I have some data inside, I did some tests with other dates and everything is working, I'm just meeting this issue with the Creation data of Project

Any idea of what I'm doing wrong?

Thank you for your help

8 Replies

  • Toxicboumboum - I just ran a quick test.  I created a new Project Center view and added the Created column to the view.  When I navigated to the Project Center page and applied the custom view, the Created column correctly shows the creation date of each project.  So, I do not know why you are attempting to create a custom field when the default Created field contains the data you seek.  Hope this helps.

    • Toxicboumboum's avatar
      Toxicboumboum
      Copper Contributor

      Dale_HowardMVP 

      Hello dale, thank you for your reply

      In fact, I'd like to group my project by Month creation ,

      So I tried to build a custom field like:

      Month([Created]/Year([Created]) but each time, this field returns /, so for my test, I'd just try to add [Created]

      • Dale_HowardMVP's avatar
        Dale_HowardMVP
        MVP

        Toxicboumboum -- You will need to create an enterprise custom Project field that is the Text type.  In the field, enter the following formula:

         

        Month([Created]) & "/" & Year([Created])

         

        After you create and save the formula in Project Web App, you will need to open each project in Microsoft Project Professional, press the F9 function key to recalculate the project (and the formula value for that project), then you will need to save and publish the project.

         

        You cannot merely create the formula and expect it to work for all existing projects.  When you create new enterprise custom fields AFTER projects have already been created, you have to open each project, recalculate the project, then save and publish it.  Any project created AFTER you created the enterprise custom field will automatically recalculate the custom field value.

         

        I think you have been skipping some very important steps.  Hope this helps.

  • Hello Toxicboumboum ,

    You should be able to use just [Created] in the formula but once the custom field is created you will need to open and publish each project before you will see a value in the new custom field.

    Paul

    • Toxicboumboum's avatar
      Toxicboumboum
      Copper Contributor

      Paul_Mather 

      Thank you for your answer, but this is the tricky point

      It doesn't work, I know that I have to republish my Project to take this value
      I continue to investigate and I found something weird,

      So as mentionned, In my project center view, for the [Created], I have a date but If I open a Project in MSProject, I add the column created and there, the colum indicates N/A

      It looks like that the custom field which has to use [Created] is not reading data from the same table than in my Project center

Resources