I am a beginner here,
i want to Implement a Search from my dataset using two input field (phone number and invoice number). from this search, I want show some information about customer from the same dataset…!
please help me🙃
Do you use CODE?
How is structured your DATABASE?
“phone number” and “invoice number” are in the same DATA-Collection, or in two different?
more-input = more-output ![]()
i working on this code now…
phone number and invoice number are in same data collection
import wixData from ‘wix-data’ ;
export function button21_click(event) {
wixData.query( “DATA” )
.contains( “billNumber” , $w( " #input1" ).value)
.and
wixData.query( “DATA” )
.contains( “phoneNumber” , $w( “#input2” ).value)
.find()
.then(res => {
$w( "#repeater1" ).data = res.items
})
}
Perhaps this one…
import wixData from 'wix-data';
$w.onReady(()=>{
let myButton = $w('#button21')
myButton.onClick(()=>{start_mySerachFunction()})
})
function start_mySerachFunction() {
wixData.query("DATA").contains("billNumber", $w(" #input1").value)
.and(wixData.query("DATA").contains("phoneNumber", $w("#input2").value));
.find()
.then(res => {console.log(res)
let myItems = res.items
console.log(myItems)
$w("#repeater1").data = myItems
})
}
how can i show this result into specific text fields(instead of repeater and table)
how can i show this result into specific text fields(instead of repeater and table)
This has been already resolved ?