Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Calculated Project or Portfolio Field Pulling In Companies Data

Avatar

Level 10

Hi WF Community,

Is anyone aware of how to pull in field data from the Companies object into a calculated custom field on either a project (preferred) or portfolio custom form?

It doesn't appear as though there is a direct relationship between Companies and Project or Portfolio; however, when creating a project, there's a a lookup field called Company, which makes me think these object actually have a relationship.

Thanks.

Nick

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think you just need to be aware that the syntax in a calculated custom field is different from the syntax in reporting. You might want to try something like Company.US or CDN Company, for example. It's pretty easy to determine -- or remind yourself -- of the approximate syntax. The fields picker at the bottom of the left hand panel of the calculated custom form contains SOME fields at the project level (if I remember correctly you are in a project custom form) -- you can see there are custom fields in that picker and when you select them, you can see what Workfront uses for that syntax.

In custom fields where you have put in punctuation (for example if you had called your field "US or CDN Company?"), these work less well, and you might end up having to encase them in curly braces: one reason we mostly advocate to avoid punctuation in custom forms unless absolutely necessary (or absolutely not used in expressions or calculated custom fields)

View solution in original post

4 Replies

Avatar

Community Advisor

Have you looked at using the API explorer yet? https://one.workfront.com/s/article/Using-the-API-Explorer-1868892776 according to this, you should be able to pull in data. Try first typing in Project, and then when you select that, look at the References type, which shows that you would be able to refer to Company. From there, for instance, try a simple calculated field to test this concept, like Company.Name, for example.

Avatar

Level 10

Thanks, Skye. So a simple calculated field with Company.Name works; however, it doesn't seem to allow me to reference a custom field from the Company object (Company.DE:US or CDN Company).

I guess you can only reference standard fields, not custom?

Avatar

Correct answer by
Community Advisor

I think you just need to be aware that the syntax in a calculated custom field is different from the syntax in reporting. You might want to try something like Company.US or CDN Company, for example. It's pretty easy to determine -- or remind yourself -- of the approximate syntax. The fields picker at the bottom of the left hand panel of the calculated custom form contains SOME fields at the project level (if I remember correctly you are in a project custom form) -- you can see there are custom fields in that picker and when you select them, you can see what Workfront uses for that syntax.

In custom fields where you have put in punctuation (for example if you had called your field "US or CDN Company?"), these work less well, and you might end up having to encase them in curly braces: one reason we mostly advocate to avoid punctuation in custom forms unless absolutely necessary (or absolutely not used in expressions or calculated custom fields)

Avatar

Level 10

Curly brackets for the WIN! Thanks for this, Skye.