Waiting for the end of a GO REFRESH command before applying a filter

Hello,

I have created simple buttons applying a SELECT command with a filter. I also add a "GO REFRESH" before this SELECT command. Unfortunatelly, when this commande is applied on a large folder, the GO REFRESH command is not finished when the SELECT commande is executed.

Is there a way to wait for the end of the GO REFRESH command before executing the SELECT command?

The command:

SET QUICKFILTERCLEAR
SET FLATVIEW=ON
GO REFRESH
SELECT old-invoices-1month FILTER FILTERFLAGS=hidenomatch

This may work:

SET QUICKFILTERCLEAR
SET FLATVIEW=ON
GO REFRESH
[
SELECT old-invoices-1month FILTER FILTERFLAGS=hidenomatch
]

(Untested.)

Nope :frowning:, the filtering command is not applied anymore with the brackets.

It may not be possible with Flat View. But you can apply the filter and then turn flat view on, which might work better.

(Actually, why is the Refresh needed at all here?)

(And wouldn't a Find be better, if the aim is to find all files matching a filter below the current folder?)

Not working either if I put the flatview after.
I needed a refresh because I switch from a filter to another
Finally, I followed your advice and use a FIND command and it work perfectly:

Find FILTER NAME "old-invoices-1month" RECURSE CLEAR SHOWRESULTS=tab IN {sourcepath}
1 Like

You can make the filter show any already hidden items while hiding new ones, FWIW, but using a Find is best so I would stick with the solution you've found. :+1:t2: