I have built a configurator that has a lot of options that can be selected, and each one would require a certain amount of labor to be added to the cost if its selected. Each of these items is a material that is pulled through to the quote worksheet, so I am trying to figure out a code or a way to have labor added if an item is selected. I don’t want to have to add a whole bunch of different operations or resource groups and I cant do it at the part level because all of the part options can be sold as a component and not just on a build where the install labor would be added. Any assistance would be helpful!!
In the Configurator Rules Entry module, open your configured part/rev, and select an operation. Then click “New Rule Action”
On the new rule action line, there should be an option “Execute the specified expression” or something like that. Choose that option and click the “expression” highlighted in blue to open the code editor.
You can adjust the operation labor time by using code similar to below:
decimal AddLaborTime = 0;
if ( Inputs.MyComboBox.Value == "AddLaborOption" ) //Your Input and the result that adds time
{
AddLaborTime += 2.5m; // Decimal type values have an 'm' after the number
}
if ( Context.Entity == "JobOper" ) //Add labor time for jobs
{
JobOper.ProdStandard += AddLaborTime;
}
else if ( Context.Entity == "QuoteOpr" ) // Add labor time for Quotes
{
QuoteOpr.ProdStandard += AddLaborTime;
}
For the “AddLaborOption” do I need to add what my selection would be from the combo box?