From RPM Wiki
| Table of contents |
[edit]
Summary
API: Get a form
[edit]
Request
You need to identify the form and then include the optional information to update.
- Either the form ID or form number + process is needed.
By form ID
{
"Key":"{api key}",
"FormID":"{form id}"
}
By form number + process name
{
"Key":"{api key}",
"Process":"{process name}",
"FormNumber":"{form number}"
}
By form number + process ID
{
"Key":"{api key}",
"ProcessID":"{process ID}",
"FormNumber":"{form number}"
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/ProcFormAdd
{
"Key":"abc123def456",
"FormID":"11232"
}
[edit]
Response
{"ProcFormResult":
{
"Process": "{process name}",
"ProcessID": "{process id}",
"Form": {
"FormID": "{form ID}",
"Number": "{form number}",
"Owner": "{form owner name}",
"Status": "{status level}",
"ApprovalResult": "{approval result}",
"Started": "{started date}",
"Modified": "{modified date}",
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
],
"Worksheets": [
{
"Name": "{worksheet name}",
"WorksheetID": "{worksheet ID"
},
{repeat as needed}
],
"Participants": [
{
"Name": "{user full name}",
"Role": "{role name}",
"Read": "{last read date}"
},
{repeat as needed}
],
"Actions": [
{
"Action": "{description}",
"Owner": "{user full name}",
"Due": "{date}",
"Done": {true/false},
},
{repeat as needed}
],
"Notes": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
],
"NotesForStaff": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
]
}
}
}
- Notes are in order of oldest to newest
[edit]
Example
{"ProcFormResult":
{
"Process": "Order",
"ProcessID": "12",
"Form": {
"FormID": "18",
"Number": "ORD00010",
"Owner": "John Smith",
"Status": "Done",
"ApprovalResult": "",
"Started": "6/20/2009",
"Modified": "8/15/2009",
"Fields": [
{
"Field": "My custom list",
"Value": "Some option"
},
{
"Field": "Extra date",
"Value": "4/16/2008"
}
],
"Participants": [
{
"Name": "John Smith",
"Role": "System Manager",
"Read": "8/15/2009"
}
],
"Actions": [
{
"Action": "Follow-up",
"Owner": "John Smith",
"Due": "8/13/2009",
"Done": true,
},
{repeat as needed}
],
"Notes": [],
"NotesForStaff": [
{
"Note": "This is a test note",
"Added": "1/1/2009",
"By": "John Smith"
},
{
"Note": "This is another test note",
"Added": "2/2/2009",
"By": "John Smith"
}
]
}
}
}
[edit]
Future
For Bulletproof Tiger, include form sets (repeating fields). If the process has repeating fields enabled then the main "Fields" array would only include common fields. Each set of repeating fields would be in a set array.
- FormID is the ID of the set form
[edit]
Response
{"ProcFormResult":
{
"Process": "{process name}",
"ProcessID": "{process id}",
"Form": {
"FormID": "{form ID}",
"Number": "{form number}",
"Owner": "{form owner name}",
"Status": "{status level}",
"ApprovalResult": "{approval result}",
"Started": "{started date}",
"Modified": "{modified date}",
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
],
"Sets": [
{
"FormID": "{form set id}",
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
],
},
{repeat as needed}
],
"Participants": [
{
"Name": "{user full name}",
"Role": "{role name}",
"Read": "{last read date}"
},
{repeat as needed}
],
"Actions": [
{
"Action": "{description}",
"Owner": "{user full name}",
"Due": "{date}",
"Done": {true/false},
},
{repeat as needed}
],
"Notes": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
],
"NotesForStaff": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
]
}
}
}
[edit]
Errors
- "Process not found"
- "Form not found"
[edit]
History
- Supercharger: Feature added
- This page was last modified 20:54, 18 Dec 2009.
- This page has been accessed 1220 times.
