- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 04:19 AM - edited 02-07-2023 11:06 PM
i have created a Database View for t
for time card and time worked.
for task and case. it is working .
what changes do i need to do for this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 10:17 AM
You can always manually filter the List view or Report where the Parent -> State is not one of Closed, Resolved, Cancelled. To have the Database View ALWAYS exclude these, just create a Business Rule that looks like this:
Where Table = u_test1 in your case. The Script on the Advanced tab looks like this:
(function executeRule(current, previous /*null when async*/) {
current.addEncodedQuery('tt_parent.stateNOT IN3,6,7');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 06:32 AM
The Database View Where clause is limited in its functionality. In this case you would need to access a field (state) on a referenced field (parent). Such dot-walking is not possible in a Database View Where clause, so that's why a Business Rule is needed.