Home > Forum > General > [solved] How to refresh data table when data in other attribute is changing

[solved] How to refresh data table when data in other attribute is changing
0

I try to find option to trigger refresh button in "data table" .
OK I can click arrow .. but I would like to refresh to have no data ...

So I have form rule when some field value is changed (deleted) then is clearing fields but not reloading whole form ...
so because data is not saved or the full form is not reloaded ...
the data table stays with "old data" - i can click refresh and then will be empty or pick other value then will be reloaded full form (pass by path) .

but there is any opinion to "press button" in background ?

[webcon 2022.1.4.404.]

MVP

Hi Paweł,

you could crate a form rule in JavaScript mode which clicks on the button.

I used the below logic to refresh all data tables / rows after closing my modal dialog.
In 2022 you could use the commented lines without the 122/99 numbers.

// Will trigger reload of any data tables.
// switched from element.click() to setTimeout(() => { element.click() }, index * 122) and used a "random" interval
// executing the refresh button simultaneously breaks the refresh as of BPS 2023 R2
// Needs to be revisited at later version.
// $(".reload-button-container").find("button").each((index, element) => { element.click() });
// $(".reload-button-container").find("span").each((index, element) => { element.click() });
$(".reload-button-container").find("button").each((index, element) => { setTimeout(() => { element.click() }, index * 122) });
$(".reload-button-container").find("span").each((index, element) => { setTimeout(() => { element.click() }, index * 99) });

Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.