cancel
Showing results for 
Search instead for 
Did you mean: 

How to Grey Out an Attribute or Attribute Value in SAP CPQ?

Denis96
Discoverer
0 Kudos
214

Hi SAP CPQ experts,

I am working on a configuration in SAP CPQ where selecting one option should disable another option by greying it out instead of making it disappear. Additionally, an infobox should provide an explanation for why the option is disabled.

So far, I have successfully configured a Disallow Attribute Dependency Rule and added an infobox to display additional information. However, I haven't found a feature that allows me to visually modify the appearance of a field (e.g., changing its color) or making it visible but not editable based on conditions.

The use case:

  • The end user selects an attribute value in a quote.
  • Another attribute (or attribute value) should then be greyed out (disabled) but remain visible, along with an explanation in an infobox.

Is there a standard way to achieve this in SAP CPQ? Or would this require customization?

Thanks in advance for your help!

Denis Gönc

View Entire Topic
Fancy_Zou
Product and Topic Expert
Product and Topic Expert

Hi,

Yes, you can achieve the desired result using the standard product modeling method in SAP CPQ.

To grey out an attribute, you can adjust its property by setting 'Access' to 'ReadOnly'. This will create the desired UI effect.

However, formula rules currently do not support changes to the 'Access' property of an attribute. Instead, scripting is required to read and modify the access level of an attribute within a product configuration model. You can implement these changes through the Attribute Trigger event or other supported Product context events. Below is a detailed guide for scripting:

Best Regards,
Fancy

akhilesh595
Explorer

This is what Fancy_Zou is referring to
from Scripting import AttributeAccess
Product.Attr("Attribute Name").Access = AttributeAccess.ReadOnly

akhilesh595
Explorer
0 Kudos

and this will serve your other purpose of showing info why it got disabled.
Product.Attr("Attribute Name").HintFormula = 'Attribute is disabled because of your reason...'

@Denis96 @Fancy_Zou 

Thanks,
Akhilesh.