...
Once proper operation of the SQL database is confirmed, add the SQL statement (and necessary connection information) to the GlobalForms configuration file (c:\globalforms\config\default.json). Find the resquel section in the file and add the necessary sections from the example below. At a minimum, you will need to add the /counter/id route. After editing the configuration file, GlobalForms will need to be restarted.
Code Block | ||||
---|---|---|---|---|
| ||||
"resquel": { "type": "mssql", "db": { "user": "mysqluser", "password": "mysqluserpassword", "server": "myserver\\myinstance", "database": "mydatabase", "requestTimeout":"30000" }, "routes": [ { "method": "get", "endpoint": "/counter/id", "query": "insert into GenericCounter default values;select SCOPE_IDENTITY() as SequentialID;" } ] } |
The form logic to support incrementing the value and displaying it is implement in the attached resource form: