hello ,
i’m trying to connect a gallery to my product collection and filter the gallery by the “CustomTextFields” column .
my gallery is connected to the the data set .
code :
import wixData from ‘wix-data’;
export function dataset1_ready() {
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘CustomTextFields’, ‘pro’));
}
this is a sample data from CustomTextFields column:
[{“title”:“pro”,“maxLength”:500,“mandatory”:false}]
I believe your problem is that you didn’t write the correct Field Key inside the setFilter() function.
Check the Field Key of the field “CustomTextFields” ( I believe its should be c ustomTextFields) and add the same code that you have written.