Function filtering DB doesn't work!

Thank you so much! But I have one more problem :frowning:

It works perfect at the first time.
But, after second run, It gets no data from imgtest DB

I reset the filter for imgtest DB when I close slideshow gallery.
It seems working. but after that, I click other product, It returns null.

This is for slideshow gallery
export function PdButton_click_1(event) {
let $item = $w.at(event.context);
let PdNumber = $item( ‘#List’ ).getCurrentItem().partNum
console.log(PdNumber)

imgfilter = imgfilter.hasSome( 'pdNum' , PdNumber); 
$w( '#imgtest' ).setFilter(imgfilter); 
console.log($w( '#imgtest' ).getCurrentItem()) 
$w( '#closemain' ).show(); 
$w( '#gallery1' ).show(); 
$w( '#PdRepeater' ).hide(); 
$w( '#loadingstrip' ).hide();    

}

and this is for reset filter
export function closemain_click(event) {
$w( ‘#closemain’ ).hide();
$w( ‘#gallery1’ ).hide();
$w( ‘#PdRepeater’ ).show();
$w( ‘#loadingstrip’ ).show();
$w( ‘#imgtest’ ).setFilter(wixData.filter());
}

Thank you so much in advance!