The code below was entered into a command, and it stops without error after the statement
"theDate = «Date»"
Am I doing something wrong?
// Test posting to Customer List
local theProduct,theVersion,theDate,theName
theName=«Combined Name» //Assign current database field “Combined Name” to the variable “theName”
//theProduct = «Product» //Assign current database field “Product” to the variable “theProduct”
//theVersion = «VW Version» //Assign current database field “VW Version” to the variable "theVersion"
theDate = «Date» //Assign current database field “Date” to the variable “theDate”
post “AP Customer List”, «Combined Name», theName, “AP 2018”, theDate
//Look up the value of theName in the field “Combined Name”, in the database “AP Customer List”
//Assign the value of theDate to the field “AP 2018” in the database “AP Customer List”
I don’t know why it’s stopping without error. The error should read “Missing parameter in POST.” The first parameter should be “update”, “updateadd”, or “add”. The second parameter is the database you are posting to. The third parameter should be the name of the key field in quotes, not chevrons.
Unfortunately the following code fails in exactly the same way.
// Test posting to Customer List
local theProduct,theVersion,theDate,theName
theName=«Combined Name» //Assign current database field “Combined Name” to the variable “theName”
//theProduct = «Product» //Assign current database field “Product” to the variable “theProduct”
//theVersion = «VW Version» //Assign current database field “VW Version” to the variable "theVersion"
theDate = «Date» //Assign current database field “Date” to the variable “theDate”
post updateadd, “AP Customer List”, «Combined Name», theName, “AP 2018”, theDate
//Look up the value of theName in the field “Combined Name”, in the database “AP Customer List”
//Assign the value of theDate to the field “AP 2018” in the database “AP Customer List”
This is very strange. It doesn’t make sense that you aren’t getting error messages. In this version, you haven’t quoted updateadd, so it will be looking for a field or variable by that name, and Combined Name has chevrons around it instead of quotes, so it will be looking for a field named Susan Smith or whatever, instead of one named Combined Name. Either one of those should have caused an error message.
The code below continues to stop (jumps to top of code) after
theDate = «Date»
in the code below
// Test posting to Customer List
local theProduct,theVersion,theDate,theName
theName=«Combined Name» //Assign current database field “Combined Name” to the variable “theName”
//theProduct = «Product» //Assign current database field “Product” to the variable “theProduct”
//theVersion = «VW Version» //Assign current database field “VW Version” to the variable "theVersion"
theDate = «Date» //Assign current database field “Date” to the variable “theDate”
post “updateadd”, “AP Customer List”, “Combined Name”, theName, “AP 2018”, theDate
//Look up the value of theName in the field “Combined Name”, in the database “AP Customer List”
//Assign the value of theDate to the field “AP 2018” in the database “AP Customer List”
and it does nothing.
I think that it should place “3/13/18” in the “AP 2018” field in the record that has the “Combined Name” field value of “Sam Jones”, in the database named “AP Customer List”. It does not; nothing happens.