fetch Data from a db column to drop down component

Hi All,

 

I'm trying to fetch data form one of the column of database to the drop down component on UI.

Column has redundant data e.g india,india,india, in 100 rows let say.

I'm using index(local!variable,"columnname" {}) function, but it is throwing error.. Duplicate items are not allowed in the choice Values array.

Please guide on this ..

 

TIA,

Nalini 

  Discussion posts and replies are publicly visible

Parents


  • If you are fetching the initial data using a query entity or even calling an Stored Procedure, we can use groupby using the column which is required. This will get unique data for the column and no need to doing extra manipulation of data in Appian side.

    for ex:

    local!mydropdownlaluves: a!queryEntity(
    entity: cons!MY_DATASTORE,
    query: a!query(
    aggregation: {
    a!queryAggregation(
    aggregationColumns: a!queryAggregationColumn(
    field: "MY_VALUE_COLUMN",
    isGrouping: true()
    )
    )
    },
    pagingInfo: rule!APN_pagingInfoAll()
    )
    )

    Regards
    Suresh
Reply


  • If you are fetching the initial data using a query entity or even calling an Stored Procedure, we can use groupby using the column which is required. This will get unique data for the column and no need to doing extra manipulation of data in Appian side.

    for ex:

    local!mydropdownlaluves: a!queryEntity(
    entity: cons!MY_DATASTORE,
    query: a!query(
    aggregation: {
    a!queryAggregation(
    aggregationColumns: a!queryAggregationColumn(
    field: "MY_VALUE_COLUMN",
    isGrouping: true()
    )
    )
    },
    pagingInfo: rule!APN_pagingInfoAll()
    )
    )

    Regards
    Suresh
Children