JSON Structure for Forms

This is the structure used to represent one Form in a Process.

{
  "Result": {
    "Process":"<Process Name>",
    "ProcessID":<Process ID>
    "Form": {
      "Number":"<Form Number>",
      "Title":"<Form Title>", // Since RPM21
      "FormID":<Form ID>,
      "AlternateID": <string>, // Since RPM24, optional user-provided UUID (36 characters) 
      "Owner":"<Owner Name>",
      "Status":"<Form Status>",
      "StatusDate": "<string>", // Since RPM 26
      "ApprovalResult":"<Form's pprovalResult>",
      "Archived":<bool>,
      "Started":"<Date Started>",
      "StartedBy":"<string>", // Since RPM 26
      "Modified":"<Date of Last Modified>",
      "ModifiedBy":"<string>", // Since RPM 26
      "Fields": [
        {
          "Field":"<Field Name>",
          "Value":"<Value for Field>",
          "Values": [ // Only on multi-select supplier reference fields (Since RPM24)
                  {
                      "ID": <int>,
                      "ValueUid": <string>,
                      "Order": <int>,
                      "Value": <string>
                  },
                  ... <More Values>
          ]
        },
        {
          "Field":"<Field Name>",
          "Value":"<Value for Field>",
        },
        ... <More Field Definitions>
      ],
      "Files" : [
        {
          "Added": <date>,
          "AddedBy": <string>,
          "FileID": <int>,
          "AlternateID": <string>, // Since RPM24, client-generated UUID
          "FileName": <string>,
          "Folder": <string>,
          "FolderID": <int>,
          "Size": <double>,
          "StaffOnly": <bool>
        },
        <... More Files>
      ]
      "Sets": [ 
        {
          "FormID":<Form ID>,
          "Fields": [
            {
              "Field":"<Repeating Field1 Name>",
              "Value":"<Value for Repeating Field1>",
            },
            {
              "Field":"<Repeating Field2 Name>",
              "Value":"<Value for Repeating Field2>",
            },
            ... <More Repeating Fields>
          ]
        },
        {
          "FormID":<Value for FormID>,
          "Fields": [
            {
              "Field":"<Field Name>",
              "Value":"<Value for Field>"
            },
            {
              "Field":"<Field Name>",
              "Value":"<Value for Field>",
            },
            ... <More Repeating Fields>
          ]
        },
        ... <More Repeating Field Sets>
      ],
      "Participants": [
        {
          "Name":"<Participant1 Name>",
          "ParticipantID": <Participant1 ID (int)>,
          "UserID": <System wide user ID (int)>,
          "Role":"<Participant1 Role>",
          "Read":"<Participant1 Last form read date>",
        }
      ],
      "Actions": [
        {
            "ActionID": <int>,
            "Action": <string>,
            "Assignee": <string>,
            "AddedBy": <string>,
            "Due": <string>,
            "Priority": <int>,
            "OriginalDate": <string>,
            "Done": <bool>
        },
        <... More Actions>
      ],
      "Notes": [
        {
          "Note": <string>,
          "Added": <string>,
          "By": <string>
        },
        <... More Notes>
      ],
      "NotesForStaff": [
        {
          "Note": <string>,
          "Added": <string>,
          "By": <string>
        },
        <... More Notes>
      ],
      "Signatures": [ // Since RPM19
        {
          "FAFilesID": <int>,
          "AlternateID": <string>, // Since RPM24, client-generated UUID
          "Name": <string>,
          "Date": <string: iso formatted date>,
          "Stage": <string>,
          "Company": <string>
        },
        <... More Signatures>
      ]
    }
  }
}



Field Value Formatting

Form fields are one of the main aspects of RPM’s custom forms and the way they are represented are very simple (we have written a guide on how to format field values inside table fields)

Outside table fields they are simple objects with 2 keys “Name” and “Value”:

{
     "Field": <string>,
     "Value": <string>
}

Reference fields get an extra ID key with the underlying ID for the selected value:

{
     "Field": <string>,
     "Value": <string>,
     "ID": <int>
}

The Value is always returned as a string:

  • text
  • date » ISO formatted, e.g. “2017-09-11”, “2017-09-11 14:14:00 -06:00” (no TZ information should be sent or returned).
    Note: as of RPM27 nested date/time field return their value in a 12 hour format instead of 24h so the previous exapmle will be 2017-09-11 2:14:00 PM
  • location » lat/long format “51.03241,-114.036577”
  • list » selected option
  • multi-select list » “option 1, options 3”
  • location list » the description of the selected option (not the lat/long value)
  • yes/no » “0” = No, “1” = Yes, “” – No selection
  • measurement » include units, e.g. “123 cm”
  • duration » in seconds without units, e.g “60” for 1 minute
  • money » a decimal number without currency symbol, e.g “123.4567”
  • decimal » “123.4567”
  • percent » with % symbol, e.g. “123.4567%”
  • quantity » “123”
  • yes/no list » json with options, selections, etc: {“Values”:[{“OptionID”:5288, “Value”:2, “Comment”:”A comment”} … ]}”