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
  • Check with() vs load(). If it is with() the page refreshes while it only loads once with load().

    OR
    If you are using load, you can use the file upload as a rule input, then you can call an a!save() after every upload.

    This way, the rule input can be used to display the grid properly.
  • Hi,

    Im using load(), a try to change it, but with with() function the interface doesnt work. The functional idea is upload the grid just by pressing the button. I share code with only the grid and button section:


    load(
    local!paginacion: a!pagingInfo(
    startIndex: 1,
    batchSize: 5,
    sort: a!sortInfo(
    field: "idDoc",
    ascending: false()
    )
    ...),
    {
    with(
    local!documentos: a!queryEntity(
    ),
    a!sectionLayout(
    contents: {
    ...),
    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",{})},
    links: a!forEach(
    items: local!documentos.data,
    expression: a!documentDownloadLink(
    document: index(local!documentos.data,"idDocument",{})
    )
    )
    ),
    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!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*/
    )
    },
Reply
  • Hi,

    Im using load(), a try to change it, but with with() function the interface doesnt work. The functional idea is upload the grid just by pressing the button. I share code with only the grid and button section:


    load(
    local!paginacion: a!pagingInfo(
    startIndex: 1,
    batchSize: 5,
    sort: a!sortInfo(
    field: "idDoc",
    ascending: false()
    )
    ...),
    {
    with(
    local!documentos: a!queryEntity(
    ),
    a!sectionLayout(
    contents: {
    ...),
    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",{})},
    links: a!forEach(
    items: local!documentos.data,
    expression: a!documentDownloadLink(
    document: index(local!documentos.data,"idDocument",{})
    )
    )
    ),
    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!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*/
    )
    },
Children
No Data