- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 11:19 AM
I'm having problems joining two tables
task_time_worked - logs time records on tasks
u_employee_hours - imported values from external system showing hours paid for each employee
Here's the where clause
tw_sys_created_by = eh_u_active_directory_id
When I attempt to run the join, the view freezes my session. I'm guessing because the task_time_worked is so large?
Do I need to add the user table here and reference the user table from both task_time_worked and u_employee_hours?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 12:21 PM
I think that is too advanced for the Where clause, but you can try with a before Query Business Rule using the database view as the table. Your script would look like this:
(function executeRule(current, previous /*null when async*/) {
current.addEncodedQuery('tw_sys_created_on>=javascript:gs.beginningOfLast3Months()');
})(current, previous);
I don't have a large time worked table, joined to your custom table, so I don't know if the Business Rule will run before the Where clause churns away and locks the session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 07:01 AM
I tested this just now and it looks like the BR does indeed run before the session gets locked up. I appreciate your time! Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 07:13 AM
Good news, and you are welcome!