Discussions

Expand all | Collapse all

API_RunImport Help

  • 1.  API_RunImport Help

    Posted 04-25-2017 18:42
    I'm able to do a successful import of data by a button click from one app to another using a saved Import.
    After the button is clicked, the results are displayed in an XML format (shown below)

    =====================================

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <qdbapi>
    <action>API_RunImport</action>
    <errcode>0</errcode>
    <errtext>No error</errtext>
    <import_status>1 new record was created.</import_status>
    </qdbapi>

    ===============================

    How to display the message in a friendly format....like display the results in a form which shows the user how many records have been imported.

    Any help appreciated.

    Thanks.


  • 2.  RE: API_RunImport Help

    Posted 04-25-2017 18:50
    no problem.

    Create a report of records created today by the current user.  (ie a report with two filters)  if you want to work harder you can make a report of records created by the current user in the last hour.

    Then make this formula URL button.

    var text URLONE = urlroot() & "db/" & [_DBID_Table name goes here] & "?act=API_RunImport&ID=xx";  // fill in the import ID number you see in the url when you edit the saved import.  Typically the first one will be 10.

    var text URLTWO = urlroot() & "db/"  & "?a=q&qid=xx"; // fill in your report ID#

    $URLONE
    &
    "&rdr=" & urlencode($URLTWO)