16
Views
2
Comments
[MongoDB] how to join a collection to another collection
mongodb
Web icon
Forge asset by OutSystems Lab
Application Type
Traditional Web

How can we use lookup to get the data from another collection?

2025-08-13 09-41-37
Shubham Sharma
Champion

Hi Joy,

To join two collections in MongoDB using OutSystems, you can follow these steps:

1 . Use the "ApplyToEach" action to loop through one collection and find matching records in the other collection.

2. Combine the data from both collections into a single record.

3. Use the "CreateList" action to store the combined data into a list.

4. Use the "Return" action to return the list as the result of the operation.

Note: The specifics of the solution will depend on the structure of your data and the relationships between the collections.

UserImage.jpg
Joy Diego

Hello,


Thank you so much for your reply. Just a question, where can I see those actions? We are using the MongoDB component from Forge.


Joy

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.