Any idea why when I use the following Append operation is works fine, but when using it in the Script below it gives me the error �Field- and expressions-types must match.�
This is copy of the Append operation (using the Script Recorder window)
a_tbl = table.current()
append.t_db = "c:ez linkpowercaminvoice header.dbf"
append.m_key = ""
append.t_key = ""
append.m_filter = ""
append.t_filter = "POSTED_TO_RECEIVABLES=.F."
append.type = "All"
append.m_count = 4
append.m_field1 = "Invoice_No"
append.m_exp1 = "Invoice_Header->Invoice_No"
append.m_field2 = "Deposit"
append.m_exp2 = "Invoice_Header->Deposit"
append.m_field3 = "Adjustment"
append.m_exp3 = "Invoice_Header->Adjustment"
append.m_field4 = "Cust_Id"
append.m_exp4 = "Invoice_Header->Cust_Id"
append.t_count = 1
append.t_case1 = "APPENDED"
append.t_field1 = "Invoice_Header->Posted_To_Receivables"
append.t_exp1 = ".t."
a_tbl.append()
This is the Script (I tried using it exactly as in the Script Recorder window, I got the same error)
b_tbl = a_db_current_path+"invoice header.dbf"
base = "@invoice header"
a_tbl = table.open(a_db_current_path+"RECEIVABLES INVOICES.dbf")
append.t_db = b_tbl
append.m_key = ""
append.t_key = ""
append.m_filter = ""
append.t_filter = "POSTED_TO_RECEIVABLES=.F."
append.type = "All"
append.m_count = 4
append.m_field1 = "Invoice_No"
append.m_exp1 = base+"->Invoice_No"
append.m_field2 = "Deposit"
append.m_exp2 = base+"->Deposit"
append.m_field3 = "Adjustment"
append.m_exp3 = base+"->Adjustment"
append.m_field4 = "Cust_Id"
append.m_exp4 = base+"->Cust_Id"
append.t_count = 1
append.t_case1 = "APPENDED"
append.t_field1 = base+"->Posted_To_Receivables"
append.t_exp1 = ".t."
a_tbl.append()
Thanks
Dan
This is copy of the Append operation (using the Script Recorder window)
a_tbl = table.current()
append.t_db = "c:ez linkpowercaminvoice header.dbf"
append.m_key = ""
append.t_key = ""
append.m_filter = ""
append.t_filter = "POSTED_TO_RECEIVABLES=.F."
append.type = "All"
append.m_count = 4
append.m_field1 = "Invoice_No"
append.m_exp1 = "Invoice_Header->Invoice_No"
append.m_field2 = "Deposit"
append.m_exp2 = "Invoice_Header->Deposit"
append.m_field3 = "Adjustment"
append.m_exp3 = "Invoice_Header->Adjustment"
append.m_field4 = "Cust_Id"
append.m_exp4 = "Invoice_Header->Cust_Id"
append.t_count = 1
append.t_case1 = "APPENDED"
append.t_field1 = "Invoice_Header->Posted_To_Receivables"
append.t_exp1 = ".t."
a_tbl.append()
This is the Script (I tried using it exactly as in the Script Recorder window, I got the same error)
b_tbl = a_db_current_path+"invoice header.dbf"
base = "@invoice header"
a_tbl = table.open(a_db_current_path+"RECEIVABLES INVOICES.dbf")
append.t_db = b_tbl
append.m_key = ""
append.t_key = ""
append.m_filter = ""
append.t_filter = "POSTED_TO_RECEIVABLES=.F."
append.type = "All"
append.m_count = 4
append.m_field1 = "Invoice_No"
append.m_exp1 = base+"->Invoice_No"
append.m_field2 = "Deposit"
append.m_exp2 = base+"->Deposit"
append.m_field3 = "Adjustment"
append.m_exp3 = base+"->Adjustment"
append.m_field4 = "Cust_Id"
append.m_exp4 = base+"->Cust_Id"
append.t_count = 1
append.t_case1 = "APPENDED"
append.t_field1 = base+"->Posted_To_Receivables"
append.t_exp1 = ".t."
a_tbl.append()
Thanks
Dan
Comment