How to add a manual editable attribute in a LPG, based on restricted fields (like the "option()" in Java for quotes?

Question

I want to add an attribute to an LPG, which allows the user to choose from a dropdown, valid for this specific element.

The manual overwrite is not the issue but the limitation of field values.

Answer

Please see the example here:

https://qa.pricefx.eu/pricefx-api/groovy/develop/net/pricefx/server/dto/calculation/AttributedResult.html

The .withManualOverrideValueOptions(myOptions) part is the essential bit.

def cost = api.getElement("Margin_pct") def myOptions = ["A" , "B" , "C" ] return api.attributedResult(cost) .withManualOverrideValueOptions(myOptions)

Found an issue in documentation? Write to us.