Validate grid items against drop down values.

Hello guys,

            I've an interface where I need to validate a grid items added by user in a gridfield and once they submit they become available for selection in the dropdown on the same interface where once they select the item they can submit finally.

 

            Has anyone ever had tried validating add/removable grid items against the existing dropdown (populated by the same gridfield) to make sure they do not enter the "duplicate" values?

 

Thanks,

Nick

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    I hope below code is useful to you

    load(
    local!data:{"data","data1","data2","data3","data4"},
    {
    a!gridLayout(
    label: " Grid",
    labelPosition: "ABOVE",
    headerCells: {
    a!gridLayoutHeaderCell(label: "Data Name")
    },
    columnConfigs: {},
    rows: {
    a!forEach(
    items: local!data,
    expression:
    a!gridRowLayout(
    contents: {
    a!textField(
    value: fv!item,
    saveInto:{ri!data,
    a!save(ri!data,"Data")}
    )
    }
    )
    )

    },
    selectionSaveInto: {},
    validations: {},
    shadeAlternateRows: true
    ),

    a!buttonLayout(
    secondaryButtons: a!buttonWidget(
    label: "Covert",
    saveInto: ri!update_Btn,
    value: "True"
    )
    ),
    a!sectionLayout(
    showWhen: ri!update_Btn="true",
    contents: {
    a!dropdownField(
    label: "",
    placeholderLabel: "Provide grid data",
    choiceLabels: local!data,
    choiceValues:local!data,
    saveInto: ri!data,
    value: ri!data

    )
    }
    )

    }
    )

    Thanks,
    Devi.
Reply Children
No Data