Question
Validation
Hey Guys,
I have a database table that contains teams that have applied to the competition. I want to check the validation, if I insert team and competition to apply that already exists in the table displays as "Already applied.
a!formLayout(
label: "Apply Team to Competition",
contents: {
a!sectionLayout(
label: "",
contents: {
a!columnsLayout(
columns: {
a!columnLayout(
contents: {
a!pickerFieldRecords(
label: "Choose a Team",
recordType: 'recordType!{9590f767-061f-48ac-850e-63e14f7db91d}SGDC Dance Team',
value: ri!map.teamId,
saveInto: ri!map.teamId,
showRecordLinks: false,
maxSelections: 1,
required: true
)
}
),
a!columnLayout(
contents: {
a!pickerFieldRecords(
label: "Choose a Competition",
recordType: 'recordType!{fa469098-7d29-4880-bf7d-18b43769b332}SGDC Dance Competition',
value: ri!map.compId,
saveInto: ri!map.compId,
showRecordLinks: false,
maxSelections: 1,
required: true,
validations: ""
)
}
)
}
)
}
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Apply",
saveInto: {},
submit: true,
style: "PRIMARY",
validate: true
)
},
secondaryButtons: {
a!buttonWidget(
label: "Cancel",
value: true,
saveInto: ri!cancel,
submit: true,
style: "NORMAL",
validate: false
)
}
)
)
