multiple assigned users filter for a query

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

multiple assigned users filter for a query

Post by swiftinitpvtltd »

I do not see a simple filter in BO query when an item is assigned to Multiple users. How do I quickly filter an item only for
users who have been assigned that task/item(if task is assigned to 3 users they only should see it-task item with om_usersassigned does not show up in query filter)
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: multiple assigned users filter for a query

Post by ddumas »

Can you explain this a bit more?

Explain all BOs and relevant attributes, and their relationships.
What specifically is not working.
Screenshots are great too.

I would like to help, but from the post, I cannot understand your setup / what is needed.

Dave
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: multiple assigned users filter for a query

Post by swiftinitpvtltd »

Thanks. basically I have a task list and multiple users are assigned to a single task-Project.
ProjectTasklist BO- it contains om_RegularUsersAssigned-multiple users for a single project task assigned

Regular User BO

All these project assignees need to see in their query grid that they are assigned to this project/projects. But the query of Task BO grid can not have filter for users because it has multiple allowed-it just does not show up in filter criteria of task list query. Is there any IN custom query that I can write for example

FIND Tasklist where LoggedInRegularUser inside Tasklist
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: multiple assigned users filter for a query

Post by himanshu »

Hi Amit,

try this

FIND TaskList WHERE LoggedInRegularUser IN TaskList.AssignedUsers
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: multiple assigned users filter for a query

Post by ddumas »

Try :

FIND Project WHERE count ProjectTaskList WHERE(LoggedInRegularUser=ProjectTaskList.om_RegularUsersAssigned and ProjectTaskList.Project = Project )>0
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: multiple assigned users filter for a query

Post by customaware »

ddumas wrote:Try :

FIND Project WHERE count ProjectTaskList WHERE(LoggedInRegularUser=ProjectTaskList.om_RegularUsersAssigned and ProjectTaskList.Project = Project )>0
This will not work as it is. You are trying to equate a single value with a multiple. I think change it to....

FIND Project WHERE COUNT ProjectTaskList WHERE(LoggedInRegularUser IN ProjectTaskList.om_RegularUsersAssigned AND ProjectTaskList.ob_Project = Project )>0

Additionally, I would think om_ should be a pm_ Reference. Having ProjectTaskList Owning Multiple RegularUsers look really dangerous to me.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: multiple assigned users filter for a query

Post by swiftinitpvtltd »

FIND TaskList WHERE LoggedInRegularUser IN TaskList.AssignedUsers this thing suggested by Himanshu worked nicely-have not checked other options as this works. Thanks all. I will check om_/pm_ references.
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: multiple assigned users filter for a query

Post by ddumas »

eagles9999 wrote:
ddumas wrote:Try :

FIND Project WHERE count ProjectTaskList WHERE(LoggedInRegularUser=ProjectTaskList.om_RegularUsersAssigned and ProjectTaskList.Project = Project )>0
This will not work as it is. You are trying to equate a single value with a multiple. I think change it to....

FIND Project WHERE COUNT ProjectTaskList WHERE(LoggedInRegularUser IN ProjectTaskList.om_RegularUsersAssigned AND ProjectTaskList.ob_Project = Project )>0

Additionally, I would think om_ should be a pm_ Reference. Having ProjectTaskList Owning Multiple RegularUsers look really dangerous to me.
Mine will work if he wants to show all projects that exists in which the logged in user is assigned on a project task within a project. If that's not what he wants then I may have misunderstood his intent.
Dave
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: multiple assigned users filter for a query

Post by customaware »

Wow! Really?! ;-)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Post Reply