We wanted to make it easier to finish an Estimate or Order by having Cyrious automatically fill in the details in the description line which would create more consistent and understandable results. With several people creating Estimates and Orders, we had a motley variety of descriptions of line items whereas a good description makes a much more readable and understandable estimate and work order for others to follow.

The concept was to pull data from the variables in the pricing form to construct a description line which will work most of the time without additional editing.

This is low risk code. If it's messed up, it won't do any harm. You'll just have to enter descriptions the old fashioned way.

  1. Open the pricing_ch_03-products for which you want to create an automatic descrption and click on the Variables tab. Under the General folder you will find the System Variable “Description”. Click on that and then click on the “Override” button at the top of the variable list. This permits you to change the formula for that variable only for the product it is in. That way you can use the same variable in all your Products but have it return different values for each product.
  2. Just above the Notes box you will see the “Use Formula” radio button. Click on that and then click on the Fn button to open Cyrious's how-to_make_coding_easier_with_the_formula_builderr.
  3. Enter the code to pull from Cyrious the information you want and then map that to the Description statement you would like to make. One important application for us was to standardize the way the shipping instructions appear. Our pricing form has checkboxes to select Commercial Carrier, UPS Ground, UPS Next Day, Deliver, etc. The code below shows how we achieved that. It contains both Boolean (Yes/No) Variables and Modifiers but you could substitute other kinds of variables and build similar code.
  4. Click Save. If you have an Order or Estimate open with the product in it which you just modified as shown here, you must open a new line item to test your work as Cyrious “stores' the old Description formula when you click OK for the product and it becomes a line item.

code format="vb"

IF Del_CustomerPickup_YN and CallWhenReady THEN "Call When Ready; Customer Will Pick Up"
ELSEIF Del_CustomerPickup_YN THEN "Customer Will Pick Up"
ELSEIF CallWhenReady THEN "-Call When Ready"
ELSEIF commercialshipper THEN "Ship Via Commercial Carrier"
ELSEIF DisplayModifierValue("StandardUPS") = "Yes" THEN "Ship Standard UPS"
ELSEIF DisplayModifierValue("UPS") = "Yes" THEN "Next Day Air"
ELSEIF DisplayModifierValue("USMAIL") = "Yes" THEN "Ship Using US Mail"
ELSEIF DisplayModifierValue("Overnight-Rush") = "Yes" THEN "Ship 2 Day Air"
ELSEIF DisplayModifierValue("Deliver") = "Yes" THEN "Acorn Will Deliver"
ELSEIF DisplayModifierValue("UPS3DayAir") = "Yes" THEN "UPS 3 Day Air"
ELSEIF UseCustomerCarrier THEN "USE CUSTOMER's CARRIER: " + CustomerCarrier
ELSEIF givetosalesperson THEN "Give To :" + TransHeader.Salesperson1.FirstName +" "+ TransHeader.Salesperson1.LastName
ELSE "Ship As Indicated"


Contributor: Steve Gillispie, Acorn Sign Graphics Date: 07/11/2009 Version: Control 4.3

You could leave a comment if you were logged in.