Guild of Project Controls: Compendium | Roles | Assessment | Certifications | Membership

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Update of user defined Field (UDF) based on another UDF

16 replies [Last post]
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
I have an Excel spreadsheet which has two columns which relate to UDF’s on activities in Primavera.
The first column is a unique number which is already in Primavera (a unique reference to a pipe), the second is a corresponding value (the length of the pipe).

I need an easy way to update the length of the pipe in Primavera, by linking to the pipe reference in the spreadsheet.

The easiest way that I can see to do this is to export to Excel at project level, update the export spreadhseet via a lookup to my external spreadsheet and then import.
This will be very time consuming as my overall project is split over many Primavera projects, and only one Primavera project can be imported at a time.

I could update the database direct, although I am loathe to do this.

Is there a way to do this through the API?

I’m using Primavera 5

Apologies if this has already been covered, it seems like quite a simple request.

Thanks

Neil

Replies

SHARIF MOHAMMADI
User offline. Last seen 8 years 39 weeks ago. Offline
Joined: 31 May 2011
Posts: 2
Groups: None

in the UDFs how can i put percentage value?

Alex Wong
User offline. Last seen 11 years 16 weeks ago. Offline
Joined: 12 Feb 2003
Posts: 874
Groups: TILOS
Dear All,

I been facing the same issues daily importing/exporting data and decided to take on challenge myself to ease the pain. I had comes up with a easy to use program to modify data within P5/P6. After testing it to the death I would like to share with everyone.

If you are interested please send me a PM and I will send you a copy of the program within next few weeks

Regards

Alex
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
Oops!

Just spotted the select data type flag. Ignore my last comment!
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
I’ve figured out part of my problem. The activity5x.xls only updates ’activity resource assignment’ UDF’s that are text fields and ignores numbers, integers, dates etc.

Anyone have any ideas why before I start hacking through the VBA?
K D
User offline. Last seen 15 years 40 weeks ago. Offline
Joined: 25 Sep 2007
Posts: 247
Groups: None
Hi Niel.
Be sure you select "Activity Resource assignment" type when you create UDF.

Thanks
Rodel Marasigan
User offline. Last seen 6 weeks 5 days ago. Offline
Joined: 25 Oct 2006
Posts: 1699
Niel,

Send me a PM with your email address so I can help you in much better communication.

HTH,
Rodel
Nikhil Menkudale
User offline. Last seen 6 years 10 weeks ago. Offline
Joined: 18 Oct 2007
Posts: 8
Hi Neil,
Have you tried "GLOBAL CHANGE" (tool) in P5 ? You can put some logical conditions to update the UDFs as desired.

Regards
Nikhil
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
I’m still having problems.
the activity5x.xls spreadsheet doesn’t bring back the UDF I’m interested in when I do "Get Resource Assignment UDF". it bring sback similar UDF’s which look as though they are setup the same. Can anyone think what i am missing?

Cheers

Neil
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
Thanks!
K D
User offline. Last seen 15 years 40 weeks ago. Offline
Joined: 25 Sep 2007
Posts: 247
Groups: None
Hi Neil.
After access to POINT by this link http://customerportal.primavera.com/ocp/default.asp?main=Point_login.asp

You search for Solution ID: prim4617

Thanks
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
Hi KD

Do you have a link to that macro? I can’t find it.

Thanks

Neil
K D
User offline. Last seen 15 years 40 weeks ago. Offline
Joined: 25 Sep 2007
Posts: 247
Groups: None
Hi Neil.
Primavera have a macro tool to "Get Activity UDF" and "Set Activity UDF". This was programmed on Excel so it can connect to database and export data to excel sheet. After update on excel ,click "Set Activity UDF", it will update data in database.
You can download this free tool at Primavera POINT website as long as you’re still on maintenance.

Thanks
Andrew Podolny
User offline. Last seen 1 year 1 week ago. Offline
Joined: 16 Nov 2004
Posts: 130
Hi Neil.
My honest opinion - the API & SDK way is much more complicated than Import / Export exercises. I did same routine tasks for my P3 projects - pipe #, batch #, length, heat # were imported through DBF using MS Access quite easily. P5 - in case you have several projects - just open it at once and export UDF to Excel then you will have 3 key fields in your exported spreadsheet - Project ID, WBS ID, Activity ID - just update the UDF from your external source and import back to P5.
Regards,
Andrew
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
I can’t see that udfvalue is available in the SDK.

Is my only option to update the PMDB database directly?
Neil Deaville
User offline. Last seen 13 years 7 weeks ago. Offline
Joined: 9 Oct 2007
Posts: 17
Thanks

I’m going to install the SDK and see how I get on.
Rodel Marasigan
User offline. Last seen 6 weeks 5 days ago. Offline
Joined: 25 Oct 2006
Posts: 1699
Neil,

You can use ODBC or SDK to update your PMDB database in one go. It requires knowledge on database and use update query by linking your Excel spreadsheet to PMDB database table. You need 2 tables in PMDB database which are UDFTYPE table that identify the Users define type/ name/ projects and UDFVALUE table where all the values are stored.

Hope this help,
Rodel