Skip to main content

Posts

Showing posts with the label Custom field

MS Project VBA - Read Lookup Table/Custom Field

After Project Online and heavy use of the PWA-Schedule features in Project Server 2010/2013 I rarely get use for my VBA skills anymore. However today I needed to update a lot of resources in Resource Center with a value from a lookuptable. Therefore I needed a way to loop through all the lookuptable/custom field values and use the value. After a little digging I found a way to read out all the lookuptable values through VBA. And of cause I need to share this. VBA to read all lookuptable values from the RBS lookuptable  Sub ReadRBSLookuptable() 'Created by Christian Holse Fanning Dim lookupTableName As String lookupTableName = "RBS" Dim rbsLT As LookupTable Dim ltValue As LookupTableEntry For i = 1 To Application.GlobalOutlineCodes.Count If Application.GlobalOutlineCodes(i).Name = Trim(lookupTableName) Then Set rbsLT = Application.GlobalOutlineCodes(i).LookupTable End If Next i If Not IsNull(rbsLT) And Not (rbs...

Project Server Read Only Custom Fields

There are multiple ways to create read only custom fields in Project Server 2007/2010/2013. The most common way is through Javascript and a Content Editor Web part (see: http://technicaltrix.blogspot.dk/2014/10/project-server-read-only-custom-fields.html ). Another more simple way is to use the build in custom fields in Project Server. The downside in this solution is that it is not as flexible as the javascript solution, however it can easily solve the most common scenarios. Read only custom field - through standard functionality Assume we have a custom field "Project SAP Number", this field is maintained by the PMO and we do not want the project managers to change it. We would then create a new calculated custom field. Go to the PWA and navigate to Server Settings->Enterprise Custom Fields and Lookup Tables. Click on New Field. Name the new field "Project SAP Number (Read Only)" and select "Project" in Entity, "Text" in Type and ...

Project Server - PSI - Update enterprise custom field with lookuptable

In Project Server - PSI it should be very fast to assign a new value to a custom field with a lookuptable. However this usually takes a lot of time for me mainly because I never can remember extactly how the field should be updated. That is why i created this post to show how a custom field (assigned to a lookuptable) can be assigned a new value. The biggest issue is that I can't remember how the different entities are connected together. The binding between the project and the lookuptable values are shown in the picture below. There are a number of steps to assign a value to a custom field with a lookuptable.  - Read the project dataset  - Find the custom field; MD_PROP_UID and MD_LOOKUP_TABLE_UID  - Find the ProjectCustomFieldRow with the same MD_PROP_UID  - Find the LookupTable with the same MD_LOOKUP_TABLE_UID  - Find the LookuptableTreesRow with the LT_VALUE_TEXT you want to assign.  - Assign the LT_STRUCT_UID fro...