The code I have below filters out the item number for the color red items. The filter Is by size, weight, and height. The results for red are shown in a “text1”. In my database the values are Item Number, Size, Weight, Height, and color. (This code works)
import wixData from ‘wix-data’ ;
$w.onReady( function () {
});
export function button1_click(event, $w) {
$w( ’ #dataset1 ’ ).setFilter(wixData.filter()
.eq( “color” , “red” )
.eq( “size” , $w( ’ #dropdown1 ’ ).value)
.contains( “weight” , $w( ’ #dropdown2 ’ ).value)
.contains( “height” , $w( ’ #dropdown3 ’ ).value)
)
$w( ’ #text 1’ ).expand();
}
(Currently)
What I would like to do is add another text field where the green colored item numbers are shown when the drop downs are selected and the button is initiated. So after a user selects the drop downs size,weight, and height. The item number will show for red in a “text1” but also show for green in “text2”. What do I need to add to my code for the green colored results to be shown?
(What I would like it to be)
Any help will be greatly appreciated!