I am trying to add a reference to all documents in Collection A to a corresponding document in Collection B. I was just going to so it in the web shell because I am just correcting an oversight that happened when I initially brought the data into these collections. My Map() function I wrote worked exactly how I wanted to except I believe it only ran the update I wanted on the first page of my index. I pasted my FQL below. Is there anyway to have this run on all documents in my collection? Maybe Paginate(Documents(Collection('Customers')))
instead of using Index()
. Thanks so much!
Map(
Paginate(Match(Index("getAllCustomers"))),
Lambda(
["customer"],
Update(Var("customer"), {
data: {
salesRef: Select(
"ref",
Get(
Match(
Index("getSalesmenByNumber"),
Select(["data", "salesmanNumber"], Get(Var("customer")))
)
)
)
}
})
)
)