addQuery in Relationship
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2020 04:29 PM
Hi experts, I made a relationship using addQuery as below
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
current.addQuery("time_card", current.task.number);
current.addQuery('state', 'IN', 'approved,processed');
})(current, parent);
this query show only approved and processed time cards but shows all the time cards from all the projects, so, I would like that show only the time cards from a project with the same EG Project ID.
I would like to know how can I do this?
Does anyone have any ideas?
thanks so much!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2020 04:34 PM
You can add a query for same project
current.addQuery(‘projectid', ‘number');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 07:42 AM
Hi Pranav! thanks for answering!
Doesn't work the ID is in both tables but I still can't relate them
Any other suggestions?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2020 04:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 07:39 AM
Hi Mike! Thanks for answering!
Doesn't work...
by the way the ID are in both tables I need to related with the query but i can't relate them