This is my first time trying to create an append operation via the web, so I may be doing it wrong.
I created an append operation on the desktop side and it works fine. I then created a dialog component, and copy/pasted the xbasic code from the desktop append function to the "OnClick" event section of my advanced button in the dialog component. The problem is that when I click the button on the web, I get the following error message:
Error in event handler code for OnClick event for 'UPDATE': Variable append.m_key references a non-existent field CDATE(DATE)-ARRIV-TOWN.
(Date, Arriv, and Town are fields that used to check for duplicate records, and disregard them if they already exist.)
Anyway, I'm confused as to why the error says those fields are non-existent, when they work fine in the desktop append operation?
Here's what the xbasic script looks like:
a_tbl = table.current()
append.t_db = "p:\bhpda5w\new carrollton pd\dailylog\details_ncpd.DBF"
append.m_key = "cdate(DATE)-ARRIV-TOWN"
append.t_key = "cdate(DATE)-ARRIV-TOWN"
append.m_filter = ""
append.t_filter = "isnotblank(\"Writtencharge\")"
append.type = "Unique only"
append.m_count = 6
append.m_field1 = "Date"
append.m_exp1 = "@Details_Ncpd->Date"
append.m_field2 = "Arriv"
append.m_exp2 = "@Details_Ncpd->Arriv"
append.m_field3 = "Location_Ncpd"
append.m_exp3 = "@Details_Ncpd->Location_Ncpd"
append.m_field4 = "Idno_Ncpd"
append.m_exp4 = "@Details_Ncpd->Idno_Ncpd"
append.m_field5 = "Town"
append.m_exp5 = "@DETAILS_NCPD->Disposition"
append.m_field6 = "Writtencharge"
append.m_exp6 = "@Details_Ncpd->Writtencharge"
append.t_count = 0
a_tbl.append()
I created an append operation on the desktop side and it works fine. I then created a dialog component, and copy/pasted the xbasic code from the desktop append function to the "OnClick" event section of my advanced button in the dialog component. The problem is that when I click the button on the web, I get the following error message:
Error in event handler code for OnClick event for 'UPDATE': Variable append.m_key references a non-existent field CDATE(DATE)-ARRIV-TOWN.
(Date, Arriv, and Town are fields that used to check for duplicate records, and disregard them if they already exist.)
Anyway, I'm confused as to why the error says those fields are non-existent, when they work fine in the desktop append operation?
Here's what the xbasic script looks like:
a_tbl = table.current()
append.t_db = "p:\bhpda5w\new carrollton pd\dailylog\details_ncpd.DBF"
append.m_key = "cdate(DATE)-ARRIV-TOWN"
append.t_key = "cdate(DATE)-ARRIV-TOWN"
append.m_filter = ""
append.t_filter = "isnotblank(\"Writtencharge\")"
append.type = "Unique only"
append.m_count = 6
append.m_field1 = "Date"
append.m_exp1 = "@Details_Ncpd->Date"
append.m_field2 = "Arriv"
append.m_exp2 = "@Details_Ncpd->Arriv"
append.m_field3 = "Location_Ncpd"
append.m_exp3 = "@Details_Ncpd->Location_Ncpd"
append.m_field4 = "Idno_Ncpd"
append.m_exp4 = "@Details_Ncpd->Idno_Ncpd"
append.m_field5 = "Town"
append.m_exp5 = "@DETAILS_NCPD->Disposition"
append.m_field6 = "Writtencharge"
append.m_exp6 = "@Details_Ncpd->Writtencharge"
append.t_count = 0
a_tbl.append()
Comment