Add or Update a Worksheet Answer
Sets the answer to a worksheet question. Can be called before a job is sent to the device to pre-populate the worksheet.
Will either update an existing answer, if the AnswerId parameter is supplied, or will add a new answer for the question.
Be sure to check if a question has been answered using the JobWorksheetQuestions web service. Use the AnswerId returned by that call to update the answer.
Query String Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | String | JobSaveWorksheetAnswer | Required |
QuestionId | Int | Retrieved from a call to jobWorksheetQuestions | Required |
AnswerId | Int | Retrieved from a call to jobWorksheetQuestions – if no answerId is specified it is assumed the question has not previously been answered and a new answer is inserted Into the DB | Required |
Answer | String | Answer value. E.g.: "True", "3.14", "List item 1" | Required |
JobId | Int | Optional | |
JobRef | String | Job reference. | Optional |
JobCustRef | Int | Job customer reference. | Optional |
Note | String | Comments or notes on the answer. | Optional |
Quantity | Double | Optional | |
ExclTax* | Double | Cost value. | Optional |
Vat* | Double | Tax as a percentage of the cost IncTax. | Optional |
IncTax* | Double | Cost value. | Optional |
Currency* | String | ISO 3 character currency identifier, e.g.: "GBP" "USD" "EUR" | Optional |
* Applicable to cost answer types.
note
Only one of JobId, JobRef and JobCustRef are required, if more than one is supplied the first in the order above will be used.
note
Either IncTax or ExclTax should be specified.
Response Codes
Code | Message | Information |
---|---|---|
0 | null | |
2 | questionId parameter required | |
2 | result | |
2 | questionResult |
Example
- Request
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=jobsaveworksheetanswer
Response Data
{ "Code": 0, "Result": [ { "ContactNoteId": "12345" } ] }