Line Item Procedure

I have an Order Form with these line item fields:

  • Prod - Product Code
  • Desc - Product Description
  • CsQty - Case Qty
  • EaPr - Price Each
  • CsOrd - Cases Ordered
  • CsPr - Case Price
  • ExtPr - Extended Cost

I am trying to run this procedure:

local xMfg
GoForm "Price List"
Select Mfg=xMfg
DescΩ=lookupselected("PRODUCT FILE","Code",«ProdΩ»,"Prod Desc","",0)
CsQtyΩ=lookupselected("PRODUCT FILE","Code",«ProdΩ»,"CsQty",0,0)
EaPrΩ=lookupselected("PRODUCT FILE","Code",«ProdΩ,"PrEa",0,0)
CsPrΩ=lookupselected("PRODUCT FILE","Code",ProdΩ»,"PrCs",0,0)

In Panorama 6 I used the above procedure to fill some of the line item fields after typing in the Product Code in the Order Form. I am testing Panorama X to see if I can switch to X; however, I am getting a variety of pop-up messages.

Field or Variable [ProdΩ] does not exist.
Field “CsOrdΩ” does not exist in database “ORDERS-TODAY”
CsPrΩ=lookupselected(“PRODUCT FILE”,“Code”,ProdΩ] does not exist.

Any help is appreciated

I have edited your post to make the formatting easier to read. I didn’t change any of the code.

As you have submitted it, I don’t see how this code could work at all on any version of Panorama. On the second to last line, you refer to the ProdΩ field as:


On the last line, you refer to the same field as:


the « and » characters must balance.

I’m guessing that the code posted on here doesn’t actually match what is in your database, but since I have no idea what actually is in your database, there is really no way to assist you. If the « and » characters really are missing, this could cause all sorts of error messages. By the way, I don’t think the « and » characters are needed at all here, since there is no punctuation or spaces in the field name (the Ω character doesn’t count as punctuation, I don’t think).

Useful tip: when I’m copying code into the forum, I select the code, then choose Source>Shift Selection Right to shift it over by 4 spaces. Then I choose Edit>Copy, then Source>Shift Selection Left, then paste into the forum. (The 4 spaces makes the formatting look nice in the forum. This gives me an idea – it would be nice if there was a command to copy the procedure to the clipboard in this format without having to manually shift-right then left.)

When I enter the Product Code in the Prod field of the Order Form (fields in Order Form Prod - Product Code, Desc - Product Description, CsQty - Case Qty, EaPr - Price Each ,CsOrd - Cases Ordered, CsPr - Case Price , ExtPr - Extended Cost), these fields are filled from the Price List Data based on code below, Prod, Prod Desc, CsQty, EaPr & CsQty.

When I try to enter a number in CsOrd, I get this message "Field “CsOrdΩ” does not exist in database “ORDERS-TODAY”. After dismissing message, I am able to enter a number. After entering the number I get this message "There is no empty " " field available. The " " would be filled with the last Prod entered. i.e. if I entered TBS the " " would be TBS.

Any ideas on what is causing the messages and how I can fix?

local xMfg
GoForm "Price List"
Select Mfg=xMfg
ProdΩ=lookupselected("PRODUCT FILE","Code",ProdΩ,"Code",0,0)
DescΩ=lookupselected("PRODUCT FILE","Code",ProdΩ,"Prod Desc",0,0)
CsQtyΩ=lookupselected("PRODUCT FILE","Code",ProdΩ,"CsQty",0,0)
EaPrΩ=lookupselected("PRODUCT FILE","Code",ProdΩ,"PrEa",0,0)
CsPrΩ=lookupselected("PRODUCT FILE","Code",ProdΩ,"PrCs",0,0)

There is clearly additional code and/or formulas in your database that you are not describing to us. No one here will be able to assist you without complete information.

You have described multiple problems. I would suggest that you start with the first problem, entering a number in CsOrd, then we can work on the other problems once that is settled. You need to find any formula that references the CsOrd field. This could be in any other field, it would not be in the CsOrd field. Please tell us about the formulas you find, and in what fields. We also need to know if the CsOrd field contains any code (not formula, but code).

There is no code in CsOrd Field.

In Pano 6 I had this code in CsPr & ExtPr Fields
ExtPrΩ=CsPrΩ * CsOrdΩ

I do not see this formula in Pano X fields. When Pano 6 is converted to Pano X, where do these formulas appear?

It depends on whether the Panorama 6 database is set to Spreadsheet mode or Procedure mode. Based on the code you submitted, this database was set to Procedure mode. In that case, the code will appear in the Code panel, not the Formula panel.

Since the problem occurs when you enter something into the CsOrd field, you need to look at the Code associated with that field.

In Pano 6 I had this code in CsPr & ExtPr Fields
ExtPrΩ=CsPrΩ * CsOrdΩ

Rereading this, what you are saying could not have worked correctly in Panorama 6. That code should have been in the CsPr and CsOrd fields, not in the ExtPr field.