It's all about the answers!

Ask a question

Query on possibilities of script based calculated value for multiple attributes

SatyaPrameela Sabbarapu (11) | asked Jun 30, 6:06 a.m.


Is there any possibility to handle multiple attributes in a single script instead of having individual script for each attribute.

For example, we have 2 attributes of same type and a script based calculated value (Attribute customization) has been implemented for one of the attributes (Attribute1).
If the same customization is required for Attribute2, then Is there a way to handle this also in the same script implemented for Attribute1. (or) do we need to create a new script and assign its return value to Attribute2?

Because we have more than 10 such kind of similar attributes and this customization should be implemented for all these attributes.

One answer

permanent link
Ralph Schoon (56.6k23642) | answered Jun 30, 9:22 a.m.
No, the calculated value can only return one value that is then processed. You have no way to "set" another attribute in a calculated value script that I would be aware of. The API does not support setting values.

You might be able to use the same script source and use some configuration option to avoid writing the code several times.

SatyaPrameela Sabbarapu commented Jul 01, 7:23 a.m.

Thanks for the response.

Could you please help me in understanding like how can the configuration options be used and where can i found these options.

Your answer

Register or to post your answer.