Hi all,
I have a grid to show documents from my folder KWC and i want to filter.
for example I must be able to search by name and date the documents that are in this folder.
this is my code :
a!formLayout( label: "Documentos", contents: { a!sectionLayout( contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!textField( label: "Nombre Documento", labelPosition: "ABOVE", helptooltip: "Nombre del documento a buscar", saveInto: {}, refreshAfter: "UNFOCUS", validations: {} ) } ), a!columnLayout( contents: { a!dateField( label: "Fecha de carga", labelPosition: "ABOVE", helptooltip: "Fecha en la que se subio el documento ", saveInto: {}, validations: {}, align: "CENTER" ) } ) } ), a!columnsLayout( columns: { a!columnLayout( contents: { a!gridLayout( label: "Documentos", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: "Documentos Cargados" ), a!gridLayoutHeaderCell( label: "Fecha de carga" ), a!gridLayoutHeaderCell( label: "Acciones" ) }, columnConfigs: { a!gridLayoutColumnConfig( width: "DISTRIBUTE", weight: 5 ), a!gridLayoutColumnConfig( width: "DISTRIBUTE", weight: 5 ), a!gridLayoutColumnConfig( width: "DISTRIBUTE", weight: 1 ) }, rows: { a!forEach( items: folder( 29305, "documentChildren" ), expression: a!gridRowLayout( contents: { a!textField( value: document( fv!item, "name" ), readOnly: true() ), a!textField( value: document( fv!item, "dateCreated" ), readOnly: true() ), a!imageField( images: a!documentImage( document: a!iconIndicator( "REMOVE" ), caption: "Eliminar", link: a!submitLink( label: "Peticion de eliminación", confirmHeader: "¡AVISO!", confirmMessage: "Estas seguro de eliminar el siguiente documento: " &chr(10) &document( fv!item, "name" )&" Creado el " &document( fv!item, "dateCreated" ), confirmButtonLabel: "CONFIRMAR", confirmButtonStyle: "DESTRUCTIVE", cancelButtonLabel: "CANCELAR", value: fv!item, saveInto: { a!deleteDocument(fv!item) } ) ) ) } ) ) }, selectionSaveInto: {}, validations: {}, shadeAlternateRows: true ) } ) } ) }, divider: "NONE", marginbelow: "NONE" ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "CONTINUAR", icon: "thumbs-up", value: cons!RCA_ACCIONES[6], saveInto: ri!acciones, submit: true, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidget( label: "REGRESAR", icon: "exclamation-circle", value: cons!RCA_ACCIONES[7], saveInto: ri!acciones, submit: true, style: "NORMAL", validate: false ) } ) )
Discussion posts and replies are publicly visible
I would
1) use local variables to save the data from your a!textField and a!dateField from the saveInto
2) Create a condition with showWhen inside the a!gridLayout to display or not each of the rows