Create Table References Based on External IDs
Hello everyone,
I followed the video below to create references Based on External IDs on the table containing 600 records :
Here is the function I created to perform this action:
It seems to work but...only 70 records are processed...
Looking at the video again, it seems that it is necessary to configure the pagination in xano to deal with "large volume" but I don't really see how to proceed...
Does anyone have an idea?
Thanks in advance for your help
Comments
-
The logic would for sure be different with paging turned on, you'd have to recursively call each page with a while loop... but luckily, we make things easier than that with the Stream return type, which works exclusively with For Each Loops... so in your case I would use the Stream return type on Query All Records from Worker...
Also, looking at your function stack, it doesn't look like you're actually editing the records - you will need to do that in order to update your database.
-
Hi Michael ! Thank you for your answer and for your great video 😃
I'm checking this type and it's definitely what i need. thank you, by the way, i have another question , how can i deal with creating a similar function but the goal is to create multiple table reference for the same record ( one to many ) ?
ps : about the edit step , yes i saw that after making my screenshot 😊 .
Merry Christmas to you and all the XANO team 🎄
-
@Mamad - it depends on your schema set up
For example, I could have a one-to-many like this:
Company id company_name Employee id employee_name company_id
With this setup, the function stack should look similar to the video.
Or you could have something like this:
Company id company_name [] employee_id Employee id employee_name
Where [] is a list (array) of employee ids. With this set up, you'd want to use the function Array: Find ALL Elements.
This would produce a list (array) of matching employee ids for the company, which you could insert into the company table.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback