Hoppa till huvudinnehållet

Automatically export xlsx from results list?

Kommentarer

4 kommentarer

  • Permanently deleted user

    Hi, not sure if you already solved it but you can try calling ExportResultsTo command from your workflow with following arguments:

     

    • format: "xlsx"
    • fsc: geocortex.framework.applications[0].featureSetManager.currentResultSet.value

     

    You can test it from browser's console with this:

     

    geocortex.framework.applications[0].command('ExportResultsTo').execute({format:'xlsx',fsc:geocortex.framework.applications[0].featureSetManager.currentResultSet.value})

    0
  • Permanently deleted user

    Hey Bogdan,

     

    Thank you for responding to my question. I am still working on this and have not had success.

     

    I tried using the "Run Command" to call "ExportResultsTo" command in my workflow with the arguments you suggested and got this error:

     

    Error in buttonBar2 element's clicked event in a Display Form activity: [WF: expression evaluation error] The given expression could not be evaluated. "{

    format: "xlsx",

    fsc: geocortex.framework.applications[0].featureSetManager.currentResultSet.value

    }" Cannot read property 'framework' of undefined

     

    And when I test is in my browser's console, I got this error:

    Uncaught TypeError: Cannot read property 'value' of undefined

     

    Attached is my inputs to the "Run Command" command, is there a mistake the way I set up the command?

     

    Again thank you for your help!

    Valerie

     

    0
  • Permanently deleted user

    We've recently moved to the latest version of Geocortex and I've noticed there is a change in the API. CurrentResultSet (geocortex.framework.applications[0].featureSetManager.currentResultSet) returns null, not an object, if there are no selected features and that's why you've got an exception when run it inside browser's console.

     

    For use in your workflow, you can try to get a reference to the result set using Get Selected Features activity and pass it's result to fsc parameter. Sorry I've forgot to mention my example is for use in browser's console not Workflow:

     

    app = geocortex.framework.applications[0];

    app.command('ExportResultsTo').execute({format:'xlsx',fsc:app.featureSetManager.currentResultSet.value});

     

    I'm sorry but my account for workflow 5 has expired, I'm still waiting for renewal so I can't help you with more examples.

    0
  • Brian Bieber

    Valerie,

    Did you ever figure this out?

    brian

    0

Du måste logga in om du vill lämna en kommentar.