Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Solved! Go to Solution.
My mistake was that I created the calculated attribute as a Real Number with Unit type attribute, should have been a String type.
So with that and a suggested formula from cgautier including the unit() function it works:
((!isNull(PRO_MP_MASS) && (PRO_MP_MASS > unit("0.1 kg"))) ? str(PRO_MP_MASS) : ((!isNull(ManWeightSpec)) ? str(ManWeightSpec) : "No weight assigned"))
Thank you
/Martin
Hello MartinBach,
Did you review kb article https://www.ptc.com/en/support/article/CS317541 ?
KR,
Charles.
Hello cgautier,
Thank you for your reply.
I had not seen the kb article, but it does not seem to help much.
I simplified the formula to: ((!isNull(PRO_MP_MASS)) ? PRO_MP_MASS : ((!isNull(AttrB)) ? AttrB : "No weight assigned")), but only get a result in the calculated attribute if both PRO_MP_MASS and AttrB are empty.
/Martin
My mistake was that I created the calculated attribute as a Real Number with Unit type attribute, should have been a String type.
So with that and a suggested formula from cgautier including the unit() function it works:
((!isNull(PRO_MP_MASS) && (PRO_MP_MASS > unit("0.1 kg"))) ? str(PRO_MP_MASS) : ((!isNull(ManWeightSpec)) ? str(ManWeightSpec) : "No weight assigned"))
Thank you
/Martin
