Hoppa till huvudinnehållet

add link in results area

Kommentarer

13 kommentarer

  • John Nerge

    Jeff,

    Are you talking about adding a Result List/Table Action that runs a workflow? If so, you can run a workflow by adding an item to the Results section of the Viewer.Defaults.xml. If you want to configure the list/tables actions for a specific viewer, you can also copy the entire Results section from the Viewer.Defaults.xml into you specific Viewer.xml and modify it there.

    <Menu Id="ResultsListActions">

     

      <Items>

     

        <Item Text="Refine Results" ToolTip="Refine search results" Command="RefineSearchResults" Module="Results" />

     

        <Item Text="Select All" ToolTip="Add all result items to the selection" Command="SelectAllResults" Module="Results" />

     

        <Item Text="Select None" ToolTip="Remove all result items from the selection" Command="DeselectAllResults" Module="Results" />

     

        <Item Text="Switch to Table View" ToolTip="Switch to table view" Command="SwitchToTabularResultsView" Module="Results" />

     

        <Item Text="Download ASCII" Command="RunWorkflowById" CommandParameter="<your workflow id>" Module="Results"/>

     

      </Items>

     

    </Menu>

     

    See the image below to see how the extra ine changes the Results List Menu Actions.

    /customer/servlet/servlet.FileDownload?file=00P6000000elzU3EAI

     

    0
  • Permanently deleted user

    Thats exactly it!  thanx.

    0
  • Permanently deleted user

    i have add the link to the tableresultsactions to export to ascii ascii file.  basically i would like to have this link behave like the "export to csv file" but instead export to an ascii file via a workflow that formats the data for an external application.  I am uncertain about how to get the data listed in the resultstable for the tab on top.

    Any help would be make me grateful!

    Jeff

     

     

    0
  • Permanently deleted user

    Similarly I want to add an "Export to XLS" link.  Is there a way to get the search results as the input FeatureSet?  I can make it work within a workflow (when I already have the results as a variable) but I'm not sure how to grab the results from the viewer.

    0
  • Permanently deleted user

    First of all, I would like to point the following difference.

    Any command implementation under  <Menu Id="ResultsListActions" > is not available any feature set as the parameter since List Result contains from one or more different FeatureSets,

    while any command implementation under <Menu Id="ResultsTableActions" > has a FeatureSet as the parameter (FeatureSet belong to each Tab).

    In the case for you want to put the link under <Menu Id="ResultsListActions" >,

     I would implement a custom command to filter out interesting feature either from FeatureSetManager.ActiveCollection or FeatureSetManager.DefaultCollection as the datasourse (part of FeatureSet of all FeatureSet under the Result of List View) to run the workflow, and pass FeatureSet as the Json string to the Workflow (Server) from the Viewer (Client) as the Argument. It requires bit of coding to find out FeatureSet through FeatureSetManager, and progratically execute the Run workflow with the assigning argument using WorkflowCommand.RunWorkflow etc.

    In the case for you want to put the link under <Menu Id="ResultsTableActions" >, the custom command is much easier since the a FeatureSet is available already to send to the Workflow from the Viewer (Client). But I think this is also not simple configuration either, but requires little bit of code to implement a custom command to run the workflow with the FeatureSet passed through the Argument.

    I think you need to check it out the QuickStart to learn about implementing a custom command etc, and expose to the little deep coding experience using Gcx GVS API like WorkflowCommands, FSMCollectionClosedEvent etc.

    If you make this work by passing FeatureSet from the client to the workflow, the workflow implementation is easy to since there are the product activities tou can use, like Convert FeatureSetToDataTable, ExprotDataSetToXLS, etc.

    0
  • Permanently deleted user

    Thanks Munwhan!  I'm using the ResultsListActions, and I figured out the workflow using FeatureSetToDataTable > DataTableToXls > CreateTempFile > NavigateToUrl.  So it sounds like I just need to learn how to pass the FeatureSet from the client to the workflow.  I'll check out the QuickStart and see how it goes :)

    0
  • Permanently deleted user

    Jeff & Stephanie,

    I just wanted to point out that if you are working with the Silverlight viewer, there is a module in the Code Gallery to get feature sets from the results list into a workflow. I have not tested it, but feel free to give it a try.

    https://support.geocortex.com/helper-activities-for-working-with-result-sets-in-the-silverlight-viewer

    0
  • Permanently deleted user

    Awesome!!!  Thanks so much, Paul, that worked for me!  :D

    0
  • Permanently deleted user

    I just noticed that the XLS file includes all fields, even the ones that are set to be not visible in Essentials Manager. Is there a way to change this? The CSV file (from the out of the box Export to CSV link) only includes visible fields and that is what we want for XLS too.

    0
  • Permanently deleted user

    Unfortunately, because the DataTableToXls and DataSetToXls workflow activities are server side activities they don't have access to a site, and it is in the site where field visiblity is configured. The viewer's default Export to CSV is executed client side so it has access to the site and the field visibility.

    If you are able to pass in the fields to include as arguments to the workflow you can process the datatable to remove the columns before using the DataTableToXls activity.

    0
  • Permanently deleted user

    Ok, so I guess I wouldn't be able to make it work for a general Export To XLS workflow that just throws whatever is in the results table into an XLS, because the fields would be different for each layer.  Right?

    0
  • Permanently deleted user

    As usual you are correct :) If you really want a generic version, a custom client-side workflow activity would have to be written that removes any hidden fields before returning them to the workflow.

    0
  • Permanently deleted user

    haha :) thanks.  Good to know!

    0

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