The Grid data doesnt refresh until change focus in other place

Hi everyone,

I´ve a problema refreshing a grid in an interface.

I cannt get the grid updated when uploading a new file, until the interface doesnt load some data (using the drop box for example), I cannt see the new file listing. Is it possible to refresh the grid automatically once the file has been uploaded? After push the "CARGAR" button, using triggers (no idea how this is..) or something like this.

Thanks for your help, and for your time of course!

Best regards!

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Hi!
    The grid area is in with() function, but inside load(). If I change external load() for with(), the process ends and returns to the main interface (the grid interface is part of a much larger application). Thanks for answer so quickly!

    The code is:

    load(

    local!filter:{
    documentType: null,
    name: null,
    documentSubtype: null
    },
    {
    with(
    local!paginacion: a!pagingInfo(
    startIndex: 1,
    batchSize: 5,
    sort: a!sortInfo(
    field: "idDoc",
    ascending: false()
    )
    ),

    local!documentos: a!queryEntity(
    entity: cons!OBE_CT_Document,
    query: a!query(
    logicalExpression: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: "idCase",
    operator: "=",
    value: ri!idCase
    ),
    if(isnull(local!filter.documentType),
    {},
    a!queryFilter(
    field: "documentType",
    operator: "includes",
    value: local!filter.documentType
    )
    ),
    if(isnull(local!filter.name),
    {},
    a!queryFilter(
    field: "name",
    operator: "includes",
    value: local!filter.name
    )
    ),
    if(isnull(local!filter.documentSubtype),
    {},
    a!queryFilter(
    field: "documentSubtype",
    operator: "includes",
    value: local!filter.documentSubtype
    )
    )
    }
    ),
    pagingInfo: local!paginacion
    )
    ),

    a!sectionLayout(
    contents: {
    a!boxLayout(
    label: "On Boarding Documents",
    contents: {
    a!sideBySideLayout(
    items: {
    a!sideBySideItem(
    item: a!textField(
    label: "",
    labelPosition: "COLLAPSED",
    placeholder: "-- Name to search --",
    value: local!filter.name,
    saveInto: {local!filter.name},
    refreshAfter: "KEYPRESS",
    validations: {}
    )
    ),
    a!sideBySideItem(
    item: a!textField(
    label: "",
    labelPosition: "COLLAPSED",
    placeholder: "-- Document type to search --",
    value: {local!filter.documentType},
    saveInto: {local!filter.documentType},
    refreshAfter: "KEYPRESS",
    validations: {}
    )
    ),
    a!sideBySideItem(
    item: a!textField(
    label: "",
    labelPosition: "COLLAPSED",
    placeholder: "-- SubDocument type to search --",
    value: local!filter.documentSubtype,
    saveInto: {local!filter.documentSubtype},
    refreshAfter: "KEYPRESS",
    validations: {}
    )
    ),
    a!sideBySideItem(
    item: a!richTextDisplayField(
    label: "",
    labelPosition: "COLLAPSED",
    helptooltip: "",
    value: {
    a!richTextIcon(
    icon: "trash-o",
    caption: "Clean search filters",
    link: a!dynamicLink(
    label: "Dynamic Link",
    saveInto: {a!save(local!filter,null)}
    ),
    size: "LARGE"
    )
    }
    ),
    width: "MINIMIZE"
    )
    },
    alignvertical: "MIDDLE",
    spacing: "STANDARD"
    ),
    a!gridField(
    label: "Paging Grid",
    labelPosition: "COLLAPSED",
    totalCount: local!documentos.totalcount,
    columns: {
    a!gridTextColumn(
    label: "Type",
    data: {index(local!documentos.data,"documentType",{})}
    ),
    a!gridTextColumn(
    label: "Subtype",
    data: {index(local!documentos.data,"documentSubtype",{})}
    ),
    a!gridTextColumn(
    label: "Name",
    data: {index(local!documentos.data,"name",{})}
    ),
    a!gridTextColumn(
    label: "User",
    data: {index(local!documentos.data,"user",{})}
    ),
    a!gridTextColumn(
    label: "Creation Date",
    data: {index(local!documentos.data,"creationDate",{})}
    )
    },
    value: local!paginacion,
    saveInto: {local!paginacion},
    requireselection: false,
    validations: {},
    shadeAlternateRows: true,
    spacing: "DENSE",
    borderstyle: "STANDARD"
    ),
    a!richTextDisplayField(
    label: "",
    labelPosition: "ABOVE",
    value: {
    a!richTextItem(
    text: {
    "New Document File"
    },
    color: "STANDARD",
    style: {
    "STRONG"
    }
    )
    }
    ),
    a!sideBySideLayout(
    items: {
    a!sideBySideItem(
    item: a!dropdownField(
    label: "Document Type:",
    labelPosition: "ADJACENT",
    placeholderLabel: "--- Select a Value ---",
    choiceLabels: {rule!OBE_ER_getValorCombos("documentTypes",null).descripcion},
    choiceValues: {rule!OBE_ER_getValorCombos("documentTypes",null).descripcion},
    value: ri!documentosAdjuntos.documentType,
    saveInto: {ri!documentosAdjuntos.documentType},
    required: true,
    validations: {}
    )
    ),
    a!sideBySideItem(
    item: a!dropdownField(
    label: "Document Subtype:",
    labelPosition: "ADJACENT",
    placeholderLabel: "--- Select a Value ---",
    choiceLabels: {rule!OBE_ER_getValorCombos("documentSubTypes",null).descripcion},
    choiceValues: {rule!OBE_ER_getValorCombos("documentSubTypes",null).descripcion},
    value: ri!documentosAdjuntos.documentSubtype,
    saveInto: {ri!documentosAdjuntos.documentSubtype},
    required: true,
    validations: {}
    )
    ),
    a!sideBySideItem(
    item: a!fileUploadField(
    label: "",
    labelPosition: "COLLAPSED",
    target: cons!OBE_CONS_DocumentosKC,
    fileNames: fv!file.name,
    maxselections: 1,
    value: ri!documentosAdjuntos.idDocument,
    saveInto: {ri!documentosAdjuntos.idDocument},
    validations: {},
    buttonstyle: "PRIMARY",
    buttonsize: "SMALL"
    )
    )
    },
    alignvertical: "MIDDLE"
    ),
    a!richTextDisplayField(
    label: "",
    labelPosition: "ABOVE",
    value: {
    a!richTextItem(
    text: {
    "
    "
    },
    color: "STANDARD",
    style: {
    "STRONG"
    }
    )
    }
    ),
    a!buttonArrayLayout(
    buttons: {
    a!buttonWidgetSubmit(
    label: "ADD DOCUMENT",
    saveInto: {a!save(ri!documentosAdjuntos.user,loggedInUser()),
    a!save(ri!documentosAdjuntos.idCase,ri!idCase),
    a!save(ri!documentosAdjuntos.creationDate,now()),
    a!save(ri!estado,"upload"),
    a!startProcess(
    processModel: cons!OBE_CT_DocumentOnBoarding,
    processParameters:{
    documentOnBoarding: ri!documentosAdjuntos,
    estado: "upload"
    }
    ),
    a!save(ri!documentosAdjuntos,null)
    },
    style: "NORMAL",
    validationGroup: "submit"
    /*submit: true*/
    )
    },
    align: "END"
    )
    },
    style: "ACCENT"
    )
    }
    )
    )
    }
    )


    Thank you so much for your time!!