This only shows row at a time
Does anyone know why ?
This only shows row at a time
Does anyone know why ?
What are you trying to do? What do you have in your database? What results do you expect and what are you getting as results?
I have 2 databases
Arrivals1
Arrivals2
I have 2 similar columns in both databases
FileNumber
FileNumber
I have a dynamic Page connected to Arrivals1 Database and it is displaying the FileNumber from the dynamicDataset into a Repeater.
Now on my Arrivals2 Database I have a column called ’ email ’
For instance the File Number 1234 is present in both databases but the ’ email ’ of 1234 is only in Arrivals2
How can I display the ’ email ’ from Arrivals2 inside the Repeater on the dynamic Page connected to Arrivals1
I tried this code but to no avail.
import wixData from 'wix-data';
export function dynamicDataset_ready() {
let itemObj = $w("#dynamicDataset").getCurrentItem();
wixData.query("ArrivalsDatabase")
.eq("fileNumber", $w('#file').text)
.find()
.then(res => {
let clientEmail = [{"email": ''}];
clientEmail.push(...res.items.map(mail => {
return {'email': mail.email};
}));
$w("#mail").text = String(clientEmail);
})
}
Then I tried filtering one dataset by another as given in the support document but it only displays 1 row value at a time in the repeater or table
I don’t see a table or a repeater in your code. What contents are you repeating?
Look at my 1st Database
Those file numbers are also present in another Database
In this 2nd Database I have the emails
Now in my Page I have a repeater displaying results from the 2nd Database but as you can see I do not want all the data from the 2nd Database displayed, only the ones whose File Numbers exist in the 1st Database, hence I tried the filter below
There are a total of 3 matches between those 2 Databases but when I Publish and view the below happens
Hi Shan,
Does it work in preview mode?
Roi.
Hey Roi,
It works but it only displays 1 row at a time.
Mikhail told me it is designed to be like this: https://www.wix.com/code/home/forum/questions-answers/filtering-sorting-a-table-or-a-list (The last 6 comments)
Shan