Mapping results of a query to a list

Mapping results of a query to a list

Comments

  • Hello,

    I have a database query step, where I am trying to display the results of the query to a form. I have successfully done something similar , where I can map one column/row of the results and be able to display them. However, I was unable to show map all of the rows on a form. Am I able to do that with Decisions?

  • Hello Sam,

    If we have a database query step defined, we can use the resulting data structure and pass the results from the query to the data grid. We can set the data type used by the datagrid to be the same as the queries output type. We can find the queries output type in the properties panel for the step.
    [img]att4[/img]

    To specify the datagrid to use this datatype:
    [ul][li]Open the form in the Form Designer
    [/li][li]Under the “Input Data” header define a data name for the component, set PickTypes to PickType, and set the Type to be the queries output type.
    [/li][li]You can find the datatype needed under User Defined Types -> Defined Data Structures header in the dropdown menu, or by typing in the search box.
    [/li][/ul]

    [img]att3[/img]

    Afterwards, we would need to use the results of the input step as an input to the form.
    [img]att2[/img]

    I have attached an example project that can be used as a reference.
    [i]edited by anthony.ben@decisions.com on 2/25/2020[/i]

  • Hi all,

    Id like to add that dynamic results for different queries can be viewed in a Decisions form as well. This is exemplified in the attached project.

Sign In or Register to comment.