PLM 360 General

PLM 360 General

Product Support
Posts: 202
Registered: ‎02-21-2012
Message 1 of 12 (287 Views)

Computed Fields tutorials

287 Views, 11 Replies
03-06-2013 10:16 AM

As promised in today's PLM Talk - some handy-dandy links for you guys!

Computed Fields: Small but Powerful

Seeing Red

W3 Schools SQL Tutorial

Enjoy!

Michelle

Michelle Stone
PLM Product Manager
Autodesk, Inc.
Active Member
Posts: 11
Registered: ‎10-31-2013
Message 2 of 12 (167 Views)

Re: Computed Fields tutorials

02-05-2014 12:12 PM in reply to: michelle.stone

Hi Michelle,

I was hoping to find more information about computed fields in the referenced tutorial "Small but Powerful", but when I click on it, the link merely goes to the main http://help.autodesk.com/view/PLM/ENU/ page. Is the tutorial still available?

Specifically, my question is how to deal with null data in a computed field formula. In the example below if FACILITY3 is null, the computed field is blank. If FACILITY3 is 0, the computed field shows the correct value (an average rating).

((FACILITY3 * 3) + (FACILITY4 * 4) + (FACILITY5 * 5)) / FACILITYTOT

Alternatively, if the FACILITY3 field could be hidden if the value is 0 but shown if the value is greater than 0, that would work, too.

Thanks,

Sara

Product Support
Posts: 202
Registered: ‎02-21-2012
Message 3 of 12 (155 Views)

Re: Computed Fields tutorials

02-05-2014 01:45 PM in reply to: sara.murray

Sara - I'll check with our content team about reviving the tutorial (I had it saved locally, so I'll post in a seperate response).

To address your question - a few things to think about.  You could use case statements to solve, or I'd probably just make any fields that are part of the computed field mandatory.

Quick example of a case statement that would work:

CASE WHEN (FACILITY3 is null)
THEN
((FACILITY4 * 4) + (FACILITY5 * 5)) / 2
ELSE
((FACILITY3 * 3) + (FACILITY4 * 4) + (FACILITY5 * 5)) / 3
END

{you'd have to extend for cases where the other facilities are also null - I'd go back to the original suggestion to have them mandatory if you are using them in calculations}

Hope that helps!

Michelle

Michelle Stone
PLM Product Manager
Autodesk, Inc.
Product Support
Posts: 202
Registered: ‎02-21-2012
Message 4 of 12 (154 Views)

Re: Computed Fields tutorials

02-05-2014 01:52 PM in reply to: michelle.stone

Below of some examples of how you can use computed fields.  In this first set of examples, you can see how using computed fields gives you immense flexibility for formatting information.

Next up – math!  I’m sure you’ll quickly see how this can be very useful, especially if your current processes rely on Excel.

This can be extended to use more complex calculations.

We can use computed fields for conditioning logic as well.

This next example shows a slick way to embed a Google map from the provided address information.

Try some fun formatting on your own and take advantage for the flexibility you have in Autodesk PLM 360.

Michelle Stone
PLM Product Manager
Autodesk, Inc.
Active Member
Posts: 11
Registered: ‎10-31-2013
Message 5 of 12 (140 Views)

Re: Computed Fields tutorials

02-06-2014 09:25 AM in reply to: michelle.stone

Thank you, Michelle. I went ahead and made them mandatory and filled in a zero or positive integers for each field. I am using the original formula:

((FACILITY3 * 3) + (FACILITY4 * 4) + (FACILITY5 * 5)) / FACILITYTOT
This works for the Facility Average Rating.

However, the fields below that in the matrix with different names are not calculating correctly, even though the field names have been changed in the formula of the computed field section.

For example, if AGENDA3 = 0, AGENDA4 = 1, AGENDA5 = 4, and AGENDATOT = 5 (1 respondent gave a rating of '4', and 4 respondents gave a rating of '5'), AGENDAAVG should be 4.80 but instead it calculates as 4.00. (Screenshots below.)

I tried deleting the original Agenda-Avg field and re-creating from scratch a new Agenda-Average field, but still have the same issue.

Any guidance for this problem?

Product Support
Posts: 202
Registered: ‎02-21-2012
Message 6 of 12 (134 Views)

Re: Computed Fields tutorials

02-06-2014 11:59 AM in reply to: sara.murray

Sara - make sure you are referencing the correct Field ID in the computed field.  4 is the correct average rating for the first row of your matrix.  The field IDs for the other inputs differ so you'll need to update the calculated field formula for each subsequent row.

Michelle

Michelle Stone
PLM Product Manager
Autodesk, Inc.
Active Member
Posts: 11
Registered: ‎10-31-2013
Message 7 of 12 (127 Views)

Re: Computed Fields tutorials

02-06-2014 12:21 PM in reply to: michelle.stone

Yes, I had already updated the computed field formula for each subsequent row, as in my second screenshot above for the "Agenda" row. Therefore it is hard to figure out why the average rating for each subsequent row is not showing properly.

I will include another screenshot here that was too big for my previous posting:

Product Support
Posts: 202
Registered: ‎02-21-2012
Message 8 of 12 (89 Views)

Re: Computed Fields tutorials

02-12-2014 09:18 AM in reply to: sara.murray

Sara - I'll create a support case and have someone from the Technical Support team work with you more closely with you.

Thanks,

Michelle

Michelle Stone
PLM Product Manager
Autodesk, Inc.
Active Member
Posts: 11
Registered: ‎10-31-2013
Message 9 of 12 (61 Views)

Re: Computed Fields tutorials

02-19-2014 08:10 AM in reply to: michelle.stone

I appreciate your response; do you have a support case number that I can reference?

Thanks,

Sara

Product Support
Posts: 202
Registered: ‎02-21-2012
Message 10 of 12 (45 Views)

Re: Computed Fields tutorials

02-20-2014 03:58 PM in reply to: sara.murray

Sara - it's case #08146934.

Michelle Stone
PLM Product Manager
Autodesk, Inc.

Recently Solved

PLM 360