Refresh / Reload data in a List Block

@dmytro in your case you might need to either disable user cache or alternatively use the filter a bit inverted instead of relying updated value in user try to apply the filter on static user field e.g. email and use the linked fields user-link…

@bbelo the same logic would work for you too, instead of saying Video Ask Name is not User's Video ask try Video ask -> user-email is not User's email

this way you can even keep the user cache

Well, I have discussed it with the support and their conclusion was to disable caching.

I didn’t get in full the second solution you proposed as if field is static - then there is nothing to wait for updating :slight_smile: - the problem is exactly that each student sees his/her personal content (like there are even 20 lessons assigned to each student, maybe even different sets; however, currently he/she sees Lesson number 3, cause he/she just accomplished Lesson number 2, and another Student sees some other content, based on his/her studying roadmap and current performance) and the main way to get this changeable variable in Softr - is via the Users record, as not much is available in Conditional filters, either User or fixed value.

While writing this I had an idea that sometimes we could also try to convert the page into details page (and filter on details record), however, this is definitely not a way for a starting page, like I have in my case.

So far disabling User Cache based on the Support advice definitely helped.

Thanks, anyway.

I am having trouble getting the call-api-success to work. My code is:

<script>
window.addEventListener('update-record-success-contractlist', () => {
    window.dispatchEvent(new CustomEvent('reload-block-list6'));
        window.dispatchEvent(new CustomEvent('reload-block-list7'));
  });

window.addEventListener('update-record-success-policylist', () => {
    window.dispatchEvent(new CustomEvent('reload-block-list6'));
        window.dispatchEvent(new CustomEvent('reload-block-list7'));
  });
 
window.addEventListener('block-loaded-list4', () => {
    window.addEventListener('call-api-success-list4', () => {
        setTimeout(() => {
            window.dispatchEvent(new CustomEvent('reload-block-list6'));
        }, 2000); 
    });
});

</script>

The first two listeners work and refresh the blocks. The last one doesn’t. The blocks contractlist, policylist and list4 are the new grid blocks and list6 and list7 are normal list blocks.

I would be super grateful for any help.

I am using the one click update function:

I’ve tried to use the listener with ‘new blocks’ to refresh ‘new blocks’ and the
new blocks do not refresh.

Using the same listener with ‘new blocks’ to refresh ‘old blocks’ does work.

window.addEventListener(‘block-loaded-list-1’, () => {
window.addEventListener(‘update-record-success-list-1’, () => {
setTimeout(() => {
window.dispatchEvent(new CustomEvent(‘reload-block-list-2’));
}, 4000);
});
});

1 Like

@MattBell @MarkSchofield
The problem comes from the call-api-success event listener, for the case of Matt. @artur

the listener with ‘new blocks’ to refresh ‘new blocks’ and the
new blocks do not refresh. => there is an event listener update about it => Refresh specific block after one-click update - #16 by matthieu_chateau

3 Likes

Perfect, thank you @matthieu_chateau

Thank you @matthieu_chateau and @artur

1 Like

This is incredible. Thanks for this!!

1 Like

@matthieu_chateau How do you refresh/reload a list block within a tabbed container? Or is there a way to refresh/reload the whole tab container?

Updating, reloading, and refreshing pages has been an issue with Softr for a long time. I wish I was more confident that this latest “experiment” will work:

I would say usual cases work though without issues… this is not working mainly when there is a modal that’s containing another page with forms or so then we are not able yet to connect to other blocks in the page… other than this other cases should be working fine…

So don’t you think scrolling to pages, blocks, and tabs for forms in modals would be a good fix?

I think it is, it’s matter of effort, impact etc… we have tried few times and it’s still something we haven’t given up… I just don’t have clear time to share with you…

The problem i face is that even when I ‘Open Page’ from a completed form response in a Modal, it still does not refresh the updates of that new page (list block in tabbed container) unless i manually click refresh button.
This is likely due to my automation occuring upon the form submission which does not finish until after the new page (tabbed container) is opened.

However there should still be some simple option to refresh all lists within a tabbed container to capture new and updated records?

I lately get ton of such requests and then we see people updating data or creating via embeded airtable forms :slight_smile: if this is the case then it’s really hard to know what third party form is doing or even if it’s form or static page… If you update/create data via our action buttons you should not have issues. if it happens via our actions/form then we should be able to address… @FPX in your case it’s most probably timing issue, even Airtable requires 3-5 extra seconds to update data… if we update and open page it’s not there we many times need to wait 3-5 seconds :frowning:

Thanks for response Artur.

I use Softr action button to edit record for line items (child records).

I use a Softr Form for adding Parent record details which is on same page as the child records. I need the form to link the child records to the parent record upon clicking the Submit button on the form.

@FPX this should work but I assume we would still not know when your automation is complete ?

Interesting… It refreshes one of the tabs (which is a list block of the child records) but not the other tab (which is a list block of the parent record of those child records). The parent record was created by the form submission. If i refresh the page manually then the parent record appears in its tab.

Would you be able to show this in a quick video and share with live chat ? This is something our team can fix quickly given it’s all native scenarios