To get values in Drop down list Dynamically through Data Store Entity

I want drop down list to fill with  stored in data store entity values. Made a constant with DDG_Dynamic_ContractType--> In this Type selected Data store entity. Still not getting values.

Please guide us.

 

  Discussion posts and replies are publicly visible

Parents
  • Hello Sanjana,

    You have to use the local variables for queryentity to get the data and use that local values with required column you want to show in "choiceLabels" and "choiceValues" .
    the example of code is below:-
    load(
    local!select,
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1

    ),
    local!datasubset: a!queryEntity(
    entity: cons!EntityConstant
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(field: "AAA" ),
    a!queryColumn(field: "BBB"),
    a!queryColumn(field: "CCC"),
    a!queryColumn(field: "DDD" ),
    a!queryColumn( field: "EEE")
    }
    ),


    pagingInfo: local!pagingInfo
    )
    ),
    with(



    {
    a!dropdownField(
    label: "sahil",
    choiceLabels: local!datasubset.data.BBB,
    choiceValues:local!datasubset.data.BBB,
    value: local!select,
    saveInto: local!select,
    placeholderLabel: "select"
    )

    }
    )
    )

    Thanks
    Sahil
Reply
  • Hello Sanjana,

    You have to use the local variables for queryentity to get the data and use that local values with required column you want to show in "choiceLabels" and "choiceValues" .
    the example of code is below:-
    load(
    local!select,
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1

    ),
    local!datasubset: a!queryEntity(
    entity: cons!EntityConstant
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(field: "AAA" ),
    a!queryColumn(field: "BBB"),
    a!queryColumn(field: "CCC"),
    a!queryColumn(field: "DDD" ),
    a!queryColumn( field: "EEE")
    }
    ),


    pagingInfo: local!pagingInfo
    )
    ),
    with(



    {
    a!dropdownField(
    label: "sahil",
    choiceLabels: local!datasubset.data.BBB,
    choiceValues:local!datasubset.data.BBB,
    value: local!select,
    saveInto: local!select,
    placeholderLabel: "select"
    )

    }
    )
    )

    Thanks
    Sahil
Children