Bulk update

Home Forum General Bulk update

Tagged: , ,

This topic contains 4 replies, has 0 voices, and was last updated by  Anonymous 9 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #226

    Anonymous

    I’m trying to work out how it would be possible to perform a batch update process across all forms in a collection, the resulting field update in the form being dependant upon criteria already held on the same form.

    My requirement is to periodically produce a report containing data from all forms with a date field containing a date which is older than x days. Once reported, it should not be reported again. My approach would be to run an update across the forms using the same criteria as the report production, setting a ‘reported’ flag after printing the report off, but how?. Perhaps there is even a way of doing this at report run-time?

    Thanks

    Julian

    #4616

    ijobling
    Participant

    You can certainly set up your reports to show the information based on a date field on your form (ie > xx days ago) but to then update those form instances so they will not report again would seem to call for usage of the API triggered from an event on your report that can then update your required form instances.

    Have a look to the user guide for the API to see if that gives you what you require.

    http://www.perfectforms.com/Documentation/manual/html/api.htm

    #4617

    ijobling
    Participant

    You could probably also do this with a form that you can ‘call’ from the report (using the ‘show form’ action).

    This form can be set up to read the data into a table object to present all the form instances that meet your required criteria (one of these criteria would be a form field that by default is saying ‘not currently reported’), and then you can run a script to set a ‘already reported’ field, and then write that back to the form instance to update them.

    #4618

    Anonymous

    Thanks that sounds an interesting way to go – what would be a reasonable maximum quantity of transactions to read into a table object and update in this way?

    #4619

    ijobling
    Participant

    I can’t see there would be a maximum to worry about ? you probably only need to be reading in 2 or 3 fields to each row (a unique identifier.. name perhaps, reported .. that would read in as empty, but what you then change by script to be ‘reported’ to write back and the form instance ID.. so each form instance can then be identified in the ‘update’ back as part of the ‘where’ clause)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.