Api/ProcFormSetAdd

From RPM Wiki

Table of contents

Summary

API: Add a set of repeating fields to a form. Similar to Api/ProcFormAdd.

  • Not used for directly adding/editing actions, participants, notes, or files. Those will be separate API calls.

Request

You need to identify the master form

  • Either the form ID or form number + process is needed.

By form ID

{
  "Key":"{api key}",
  "Form": {
    "FormID":"{form id}",
    "Fields": [
      {
        "Field":"(field name)",
        "Value":"{field value}"
      },
      { repeat as needed }
    ]
  }
}

By form number + process name

{
  "Key":"{api key}",
  "Process":"{process name}",
  "Form": {
    "Number":"{form number}",
    "Fields": [
      {
        "Field":"(field name)",
        "Value":"{field value}"
      },
      { repeat as needed }
    ]
  }
}

By form number + process ID

{
  "Key":"{api key}",
  "ProcessID":"{process ID}",
  "Form": {
    "Number":"{form number}",
    "Fields": [
      {
        "Field":"(field name)",
        "Value":"{field value}"
      },
      { repeat as needed }
    ]
  }
}

Examples

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

The minimal request would be just a form. This would create a blank set form with blank repeating fields.

{
  "Key":"abc123def456",
  "Form": {
    "FormID":"11232"
  }
}

Of course it's better to actually include some field values

{
  "Key":"abc123def456",
  "Form": {
    "FormID":"11232",
    "Fields": [
      {
        "Field":"New order?",
        "Value":"Yes"
      },
      {
        "Field":"Order date",
        "Value":"Jul 2, 2009"
      },
      {
        "Field":"Estimated MRC",
        "Value":13.5
      },
    ]
  }
}

Response

Use the response from Api/ProcForm

  • The entire form is returned, not just this set.

Errors

  • "Form not found"
  • "Process not found"
  • "Permission denied"
  • "Repeating fields is off"

Details

  • Form history will show the new "API" method
  • Everything that happens with a UI start will happen here including triggers, email notifications, global actions, etc.
    • In the next version we'll provide API request commands to control this.

Future

Specific error reports including

  • "Form number error"
  • "Field ID error"
  • "Field value error"

History

  • This page was last modified 20:39, 28 Sep 2009.
  • This page has been accessed 473 times.