How do I filter between two databases?

Hello, I have two databases

User
Role - List of Option Sets called Role

Database 1 - Request
Request Status - Option Set called Status

Database 2 - Request Tracking
Request - Request
Role - Option Set called Role

Every-time a request is made, a request tracking thing is created and the request = current page’s request, and the role being whatever role the user is

Now, I want to create a dashboard, where the user can see all the requests that they are a part of. Basically, they need to see all requests where the have a request tracking thing, with no duplicates (if they submitted the same request twice, they should only see one entry for the request in the dashboard)

The request database isn’t linked to the request tracking database, but its linked vice versa

In a repeating group or table, do a search for Request Tracking with the constraint created by = current user. Now you just need to remove the “duplicates” as you say. Usually you’d use the :unique elements operator but technically each record is unique, so that won’t work in this case.

There are a few ways to handle this:

  • You can group the list by Request then only show data related to earliest request created.
  • You can sort the RG by request then add a group in the RG cell housing all elements. Next, add a condition to hide the group when RG’s list of items:item#current cell’s index + 1 's request is current cell’s request. Repeat the condition just changing “+1” to “-1”
  • Alternatively, just add a boolean field to Request tracking named “first?”. When creating the first request tracking just mark this as yes. Then you can simply add a constraint in your RG to filter for Request Trackings where first=yes

Hey, thanks for the reply!

The issue is, not all the requests are created by the current user. Other people create the request, and then the current user the Budget Manager can approve that request, so they would be added to the request tracking with the role of budget manager

Ok then just replace the created by constraint with a role constraint matching the Budget manager role. This of course assumes that you either have privacy rules to ensure that budget managers aren’t seeing records related to other budget managers or if in your use case that’s not an issue

@alex.esposito.1108

I’ve tried this but it doesn’t work

Do a search for Requests: Filtered
Filtered: Search for Request Trackings: each items Role contains Budget Manager

There’s no need to add a filter. Just REPLACE the created by constraint with a role constraint

The Request database doesn’t have a Role field within the DB.

I think I need to create a list of request tracking, and then everytime an action takes place in that request, add it to the list of request tracking for that request. After that, filter it to show the ones where the user with the specified role has completed an action. My only concern would be the amount of workload this would consume.

Did you read my comment? :point_down:

No, you don’t

@alex.esposito.1108

Sorry, I believe the question may not have been worded properly. The repeating group/table is showing the requests, not the request tracking, but i need to show only the requests they are part of using the requests tracking database. The data type for the table has to be request, not request tracking.

Yes, I know. The solutions I provided account for that

@alex.esposito.1108

If I try the first method, the data type is changed to grouping, how do I use this grouping within a Request Repeating Group?

Could you give an example of how it works please?

You should be able to find tutorials on youtube, google, or this forum that explain how groupings work. The easiest fix here though is the third option I proposed. Just add a field on the tracking datatype and mark it as yes when you create the first one