onResults
callbackonResults
is called with two arguments.
manyToOne
, the value will be an array.backendSyncMode
is "DISABLED"
, the import ID will be null
.null
if the user did not upload a file (i.e. used manual entry).importIdentifier
of this importnull
if no file was uploaded.null
if no file was uploaded.onCancel
callbackonCancel
does not receive any arguments.
beforeFinish
callbackbeforeFinish
callback. This callback will fire when the user finishes the import, and receives the same arguments as the onResults
callback. The callback also receives a third argument, instance
, with the instance of the uploader.
If you define a beforeFinish
callback, you can cancel finishing the upload by returning an object in the format { cancel: true, message: "Message to user" }
. In this case, the user will remain on the Review Screen, with the given error message shown to the user. The onResults
callback will not fire and the import will not complete. This process will repeat the next time the user submits the import.
Otherwise, if nothing is returned from the beforeFinish
callback (or any other value is returned), the onResults
callback will fire and the import will complete normally.
null
if the user did not upload a file (i.e. used manual entry).importIdentifier
of this importnull
if no file was uploaded.null
if no file was uploaded.allowCustomFields
, it will allow the user to add custom fields that are not part of the field schema. The name of the custom field will be added as a key to the result objects.
As an example, if the user defines a column name “fav_color”, the response would look like the following: