Cannot post to another database

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.

I keep hoping but…

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”

I put the following one line in a command

post “updateadd”, “AP Customer List”, “Combined Name”, “Sam Jones”, “AP 2018”, “3/13/18”

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.

What kind of field is *AP 2018"? Is it a date field? If so, then “3/13/18” is not a valid value, it should be date("3/13/18").

By the way, in this forum if you indent text by four spaces, that text will be displayed as code, which makes your message easier to read, like this:

post "updateadd","AP Customer List","Combined Name","Same Jones","AP 2018",date("3/13/18")

All you have to do is indent 4 spaces, no other special commands or tags are needed.

1 Like

That did it, yea !