Api/ProcForms

From RPM Wiki

Table of contents

Summary

API: Get forms for a process, optionally by view.

Request

Just a process by name or ID is needed if getting all forms for a process.

{
  "Key":"{api key}",
  "Process":"{process name}"
}
{
  "Key":"{api key}",
  "ProcessID":"{process id}"
}

Optionally also specify a view ID to control the forms and fields returned.

{
  "Key":"{api key}",
  "Process":"{process name}",
  "ViewID":"{view id}"
}

Or instead of a view ID, a user to get forms where they have 1 or more actions due (also known as "Action required by _____"

{
  "Key":"{api key}",
  "ProcessID":"{process id}",
  "ActionDue":"{staff user's name}"
}


Example

http://demo.rpmsoftware.com/rpm/Api.svc/ProcForms

{
  "Key":"abc123def456",
  "ProcessID":"12"
}


{
  "Key":"abc123def456",
  "ProcessID":"12"
  "ViewID:"1305"
}


{
  "Key":"abc123def456",
  "Process":"Order"
  "ActionDue:"John Smith"
}

Response

Columns, forms, and form order are determined by the view. If no view is specified then use the "All" view and default columns.

{"ProcFormsResult":
  {
    "Process":"{process name}",
    "ProcessID":"{process id}",
    "View":"{view name}",
    "Columns": [
      "{column name}",
      {repeat as needed}
    ],
    "Forms": [
      {
        "FormID":"{form id}",
        "Values": [
          "{column value}",
          {repeat as needed}
        ]
      },
      {repeat as needed}
    ]
  }    
}
  • If no view or user is specified then use the "All" view
  • If a user is specified then the view name is "Action required by {name}"

Example

{"ProcFormsResult":
  {
    "Process":"Order",
    "ProcessID":"12",
    "View":"All",
    "Columns": [
      "Number",
      "Owner",
      "Status",
      "My date field"
    ],
    "Forms": [
      {
        "FormID":"18",
        "Values": [
          "ORD00010",
          "John Smith",
          "Done",
          "12/18/2008"
        ]
      },
      {
        "FormID":"19",
        "Values": [
          "ORD00011",
          "John Smith",
          "Pending",
          ""
        ]
      },
      {
        "FormID":"20",
        "Values": [
          "ORD00019",
          "Mary Anderson",
          "New",
          ""
        ]
      },
    ]
  }    
}

Errors

  • "Process not found"
  • "View not found"
  • "No forms"
  • This page was last modified 20:25, 25 Nov 2009.
  • This page has been accessed 877 times.