Assure DQ

 View Only
  • 1.  Passing Multiple records into a control via the Assure API

    Posted 12-09-2020 13:42

    How can we pass multiple records into a Control that got triggered through Assure API, into its property TextDataItem?

    The examples in API guide has syntax for a single record.

    example2.TextDataItem=true,111,James Bond,1000.00,20051202,100.00,1

    If I have to pass another record with values - true,112,Mike Tyson,1000.00,20051202,100.00,2

    How can i achieve that?

     

     

     



  • 2.  RE: Passing Multiple records into a control via the Assure API

    Employee
    Posted 12-09-2020 15:20

    The line separator is controlled by the Layout and is a new-line (\n) character by default. This can be updated via the Record Ending and Record Value settings within the Layout if a different character is needed:

    Here's a snippet of a curl command's payload to trigger a control with three records each containing three columns. I left the default new-line character line separator:

    "textDataItem":"record,number,one\nsecond,record,here\nand,third,record"


  • 3.  RE: Passing Multiple records into a control via the Assure API

    Posted 12-09-2020 23:21

    Thanks Gerard for the response, i was able to pass multiple records with \n new-line character separator, but it only picked up the last record.It generated a control report with the last record and control data has also the last record.

    example2.TextDataItem=true,111,James Bond,1000.00,20051202,100.00,1\ntrue,112,James Bond1,1000.00,20051202,100.00,2\ntrue,222,Mike Tyson,2000.00,20051202,000.00,2

    looking to capture all the records that are passed in "textDataItem"

     



  • 4.  RE: Passing Multiple records into a control via the Assure API

    Employee
    Posted 12-10-2020 07:42

    What's the logic within the control for capturing / storing data? I get all three records with an \n separator. I also switched the property file-based method, in case the embedded new-line characters within the TextDataItem property and the "real" new-line characters throughout the property file were conflicting. Although, I captured three records in this setup too:

    example2.ControlEntity=apitestce
    example2.ControlPoint=apitestcp
    example2.TextDataItem=record,number,one\nsecond,record,here\nand,third,record
    example2.WaitForResponse=true

    Script returned 3 instances:

    INFO: Instance Count: 3

    Control data showed all three records:

     



  • 5.  RE: Passing Multiple records into a control via the Assure API

    Posted 12-10-2020 15:03

    It was the condition in Control point which cause to pick only 1 record and after fixing, it did pickup all the records.

    Thanks Gerard!