Expand my Community achievements bar.

SOLVED

How do I display the custom field of a parent portfolio in valueexpression in a project report

Avatar

Level 2

Our portfolios and our programs have a custom form with a custom field that designates what division (Workstream) of the company that work belongs to. I am trying to build a project report that displays the program Workstream value if present, but displays the portfolio Workstream value if there is no program value.

In the project report, the two fields are: portfolio:ClientWorkstream and program:ClientWorkstream (pulled via text mode). When I convert that to a value expression, I can’t get the values to return. The expression below returns the program and portfolio names, not the custom form field values.

valueexpression=IF(ISBLANK({DE:program:ClientWorkstream}),{DE:portfolio:ClientWorkstream}, {DE:program:ClientWorkstream})

I’ve only found examples of using the DE prefix on a custom field that is on the object being reported on. I’ve tried using curly braces/dots and I’ve tried with and without the DE. I’ve tried using {parent}.

This simple expression of just the field doesn’t even work.

valueexpression={program}.{ClientWorkstream}

This syntax works using standard fields works fine a value expression

valueexpression={program}.{name}

I think there must be something I’m missing on the syntax.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@Scott Chapin‚

My apologies for the confusion - in a valueexpression, you will want to reference a program custom field by using DE: in front of the custom field name.

valueexpression={program}.{DE:ClientWorkstream}

View solution in original post

7 Replies

Avatar

Employee Advisor

@Scott Chapin‚

Based on your valueexpression=IF(ISBLANK({DE:program:ClientWorkstream}),{DE:portfolio:ClientWorkstream}, {DE:program:ClientWorkstream}), in English, this reads if the program custom field, ClientWorkstream is blank, display the portfolio custom field, ClientWorkstream, otherwise, display program custom field, ClientWorkstream.

If there is no value associated with the program custom field and you would prefer to leave that column blank, you will want to adjust your expression to be as follows:

valueexpression=IF(!ISBLANK({DE:program:ClientWorkstream}),{DE:program:ClientWorkstream})

This tells the system if the program custom field, ClientWorkstream is not blank, display the program custom field ClientWorkstream, otherwise, no value (blank).

Hope that helps to clarify things!

Avatar

Level 2

Thanks @Nichole Vargas‚. I should have been more clear in my post, but my issue isn't with the logic on the IF statement but the syntax on how, within a project report, to reference a field from a custom form that project's program in a valueexpression. I thought one of these would work, but neither does. The first one returns the program name and the second one returns nothing.

valueexpression={DE:program:ClientWorkstream}

valueexpression={program}.{ClientWorkstream}

Thanks

Scott

Avatar

Correct answer by
Employee Advisor

@Scott Chapin‚

My apologies for the confusion - in a valueexpression, you will want to reference a program custom field by using DE: in front of the custom field name.

valueexpression={program}.{DE:ClientWorkstream}

Avatar

Level 2

That's what I needed. I didn't realize the DE had to directly modify the custom field. Makes sense.

Avatar

Level 2

@Nichole Vargas‚ the value expression syntax you provided did exactly what I needed. I thought I could take that same logic into a calculated field, but something isn't working. When I use {portfolio:DE:ClientWorkstream} or {portfolio:ClientWorkstream} in the field, I get the portfolio name returned. Everything else I've tried either gives a syntax error or returns a blank value. How do I reference a custom field tied to a portfolio from a project custom field? This may not even be due to a custom field. I can't get other standard portfolio fields to pull into a calculated field either.

Avatar

Employee Advisor

@Scott Chapin‚ When referencing fields in reports, you must use brackets and camel case. However, in calculated fields, you would reference the field name exactly as it is written and periods. So in a project custom form, if you want to add a calculated field for a portfolio custom field, it would look like the following:

Portfolio.ClientWorkstream

The same format would apply if you wanted to reference that field in a task custom form:

Project.Portfolio.ClientWorkstream

Additional information regarding calculated fields can be found in the article, https://one.workfront.com/s/article/Add-calculated-data-to-a-Custom-Form-1320685913.

If you have any questions, let me know!

Avatar

Level 2

@Nichole Vargas‚ Thank you again. I didn't realize the difference in letter case between the reporting and calculated fields. I think I've got it all working now.