cancel
Showing results for 
Search instead for 
Did you mean: 

CPQ: Allow/Deallow attribute value with custom table

MarcoBradanini1
Explorer
0 Kudos

Hello,

In my case i need to allow or disallow some attribute value if the value is in a custom table.

I tried with formula builder function <*xAlloweValue*> and <*xDisalloweValue*> in product rules but it not works.

Any idea? is possibile only with scripting?

Thanks

Marco

Accepted Solutions (0)

Answers (1)

Answers (1)

slyakh
Participant
0 Kudos

Marco,

Haven't tried it, but using the formula builder, it looks like these are the functions you're looking for:
xAllowValues, xDisallowValues

I would think these should work with an AUX or TABLE call.

If you're trying to allow/disallow multiple values, I'm not sure if it's possible, but you may want to play with the LIST function. For example, let's say you have...
► Attribute "FruitAttribute" with values: Pomegranate, Banana, Cherry.
► Table "FruitTable" with 2 columns: FruitName, FruitColor. Rows are:
[[Pomegranate,Red];
[Banana,Yellow];
[Cherry,Red]].

► You could then try writing this rule to disallow all the red fruit:
<* SetListSeparator(,FruitAttribute🙂 *><*xDisallowValues(FruitAttribute:<* LIST ( SELECT FruitName FROM FruitTable WHERE FruitColor = 'Red' ) *>)*>

___________________________________________
Note:

One of the problems with this design is you need to maintain a list of values in 2 places - the attribute values and the table. Adding values to an attribute can be time consuming especially it it's a line item and part numbers and prices must be added to each value. Removing attribute values is difficult (won't let you if any rule is using it) and dangerous (existing quotes break if they have those values selected, requiring workarounds like creating rules to switch selection to another selection and then disallow the previously selected value). In light of that, perhaps a better approach might be to utilize attribute types such as Drill Downs or Autocompletes.

Both of those attribute types have certain limitations (some of which aren't documented in the help files), so if you're considering them, then make sure to test them well before implementing.

From the top of my head,

Drill Downs:
► Get glitchy when only a single value is available for selection (possibly only when they're required, but not sure).
► Do not load unless shown in Configuration Layout and only when user actually navigates to the tab containing it (which is why we started the practive of only utilizing them on the first tab of configurations).

Autocompletes:
► Show only a limited number of results
► Had some display issues for some users. Not sure why and whether this has been resolved.