Configurator Operation Comments in Method Rules

I am trying to change the operation comments based on the parts that get called out in the BOM of a configurator.

Since I already have the ‘Keep Component When’ rule already defined I wanted to add a rule action on the component that would add comments to the operation comment of the operation that the part is called. Sadly I can’t seem to do that on the Rule actions. I tried to create a method variable that get modified based on the components and then just set that to the operation comments but the operation rule actions (Which seem to be the only spot you can change the comments) are ran before the materials.

Worst case scenario I could add code that runs through the keep when rules and add comments based on them in the operation rule actions but it seems prone to issues having two sets of code to essentially control the same data.

Does anyone have any suggestions?

Did you enable entity creation?

The first or second tab of Configurator Entry will have a grid showing entities like QuoteMtl, JobMtl, etc… they show if entities can be updated. If the entity is enabled, then in the Rule Actions you can use an expression like
JobMtl.Comment = "Save leftovers";

See:

I do have them enabled, and I can set the comments without issue. The issue I have is I want the comments to be modified based on the parts that are kept in that operation and from what I can tell the operation Method rules are ran prior to any of the rules of the materials inside of that operation and I do not have a way to go back and modify them after the fact.

It’s redundant, but you can make the condition rule similar to what you did in the Keep When rule.

I was hoping to avoid that as doing that seems prone to issues when the time comes for updates or changes.

1 Like

Make user defined methods. Then use that method as the keep when and for setting the comment. It will minimize the code to be updated.

Make the UD method return the string for the comment, when you want to keep the material. And return a null string when you don’t keep it. Then make the keep when rule based on the UD method returned value.

That is a possibility but seems cumbersome and I don’t like running the same code multiple times if I can help it.

I am thinking of using a method variable that gets updated during the keep when rules and then I have a UDMethod that goes back and updates the comments of the operation (Both Quote and Job) once all materials have been determined. I also plan on putting comment text in the operation rule actions noting that the comments are driven by the components and get updated via an UDMethod at a different location.

This seems like the most sustainable, least error prone option that I can think of.