مرکز آموزش

Pre-filling of a Form Entry Activity with a Task POST

Below is a simple JSON example of how you can pre-populate a Form entry via a POST request to our Tasks API.  

 

Note how we just repeat the same set of Table fields ("worker", "labour", "exist_class") in the JSON - this populates as separate rows into the Table on the Form entry.

The same technique will work with a set of fields found in a repeatable Page.

 

NOTE: For more complex cases - e.g. where you have a Table within a repeatable Page, or a Table within a Table, you must use our hierarchical format option to pre-fill the Form entry fields instead.

 

{

  "UserEmail": " user@example.com",

  "Name": "MORNING timesheet for PROJECT-001",

  "Icon": "Clock",

  "CompleteBy": "2019-03-15T00:00:00.0000000Z",

  "StartBy": "2019-03-14T18:00:00.0000000Z",

  "Activities": [

    {

        "ActivityType": "FillOutForm",

        "FormExternalId": "TIMESHEET",

        "FormAnswers": [

          {

            "Name": "work_date",

            "Value": "2019-03-14"

          },

          {

            "Name": "project_num",

            "Value": "PROJECT-001"

          },

          {

            "Name": "worker",

            "Value": "Ben Doe - 54321"

          },

          {

            "Name": "exist_class",

            "Value": "Scaffolders - Advanced Level 2"

          },

          {

            "Name": "labour",

            "Value": "12.00"

          },

          {

            "Name": "worker",

            "Value": "John Smith - 12345"

          },

          {

            "Name": "exist_class",

            "Value": "Scaffolders - Basic Level 1"

          },

          {

            "Name": "labour",

            "Value": "12.00"

          }

        ]

    }

  ],

  "CompanyId": XXXXX,

  "IntegrationKey": "XXXXXXX"

}

  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

DELETE Bulk Tasks

If you're looking to delete multiple tasks without needing to log into the web portal via our...