The functionality works so that I add a product to the order, and then, based on the selected product’s phase, I want to limit the visibility of certain fields. For example, in the case of liquid, there should be only density and liter; for gas, only pressure; for solid, liter, density, and pressure should be hidden. Additionally, the phase should limit the ability to choose values from the LOV for price type, so that possible product price calculation values depend on its phase. For example, price calculation based on liter should be available only for liquid. We are using Constellation on 24.2. How can this be achieved? I will be grateful for any tips and tricks
@kaszm if I understand your scenario correctly then the two things you’d be looking at are:
Views - Conditional Visibility
I’d look at creating a view for each “type” - and showing them when the product is of that type. This would allow each view to show the fields for just that type.
You could do it field by field, but then it starts to get messy in the configuration and likely to lead to more errors. Type by Type allows you to focus just on the UX for that one type.
There are multiple ways of doing this, what springs to mind for me is just putting the conditions on the calculation inside that calculation itself. When you create your field, you would specify this field is calculated, this creates a Declare Expression rule in Dev Studio. However, you’d need to further extend this beyond what is available when you add a field.
An Advanced Expression, would look something like this :
@kaszm to me I think you are more looking for a polymorphism solution. This can be achieved as well with the current search and select pattern (Single Select)