Bartender Tutorial 3: Using a price list from CompuPlants Gold.

In the previous example we showed how to prompt for prices. However, this can be rather inconvenient. In this example you'll see how you can create fake order in CompuPlants Gold and use the prices you provide for products in that order.

Going back to the example used in the first tutorial, let's add a cost text field. We can't link the text field to the database since we don't have that field in the database yet. So let's go add the new tables necessary. Go to the database setup screen ("File\Database Setup"), select the "Tables" tab and add the table "orderd".


Since we just added a new table we need to create a join for it. So set up a join to set "orderd.prdperno = prdtl1.prdperno"


Next, we need to restrict the order items to the new fake order we create. So on the Query tab set orderd.orderno equal to the fake order number. Of course you should create the fake order first. You can then populate and change that fake order whenever you'd like and the values in Bartender will change as well. However, there is one important difference. You must place the cost in the notes field. Why this is will be explained later.

Setting the quantities for the products to 0 would also be a good idea in case you ever accidently post that order. Duplicate items in the order will also appear twice in the print list.


Getting back to the cost text field go to it's properties, set it's source to "Database", and set the "Use Field" to "orderd.notes".

You may be asking why we use the notes field instead of the price field. It is in fact possible to use the price field but it's a bit more work. Using the price field requires setting up another check and adding another text label. If you would like to do it with the price field use "orderd.prcchg" as the "Use Field", in the "More Options" under the "Truncation" tab set it to discard 2 characters on the right (to chop off 2 of the 4 decimal places), and place a dollar sign text label in front of the price field.


And that's it. You're ready to print them out. You'll likely want to use "Select Records" on the print screen to choose which labels and how much of each to print out.

Back to tutorials index