Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I would like to create a field that returns a concatenated value. In this, I want part of it to be a parameter (i.e. {{parameter name}}). When I try to do this, the parameter never converts over from the parameter string to the actual value. Is it possible to do something like this? Or can calculated values not include parameters?
Solved! Go to Solution.
Ah I see, you meant using parameters in Computed fields. Parameter substitution does not work with this functionality. There was a request for this functionality made earlier this year but was rejected by Product Management as there is no plan to introduce that feature.
The suggested alternative is to produce the computed values using a trigger and write to the field that way.
Hi Nolin, do you have Parameter Substitution enabled in that particular context? You should click on the document/item/whatever you are looking at and then go to the View -> Options menu:
Depending on the context you are in, the parameters may appear right away or you may need to refresh (F5).
I do have substitute parameters enabled. It works fine if I just type the parameter name into a text field. When I use it as part of a concatenated value in a calculated field though it doesn't work. I've tried refreshing as well as closing and reopening the document.
Ah I see, you meant using parameters in Computed fields. Parameter substitution does not work with this functionality. There was a request for this functionality made earlier this year but was rejected by Product Management as there is no plan to introduce that feature.
The suggested alternative is to produce the computed values using a trigger and write to the field that way.
I finally got around to creating a trigger to do this. The trigger seems to fire and create the string fine but the parameters still do not substitute. It's a Pre trigger if that matters. The field type that it creates the string in is a shorttext.
Disregard. I realized I missed the "Substitute Parameters" box on the field definition.