Outsystems - Aggregate to fetch Service Center users only

Outsystems - Aggregate to fetch Service Center users only

  

Hi there!

How can I fetch service center users with an aggregate/SQL query?
With the entity User I can get all Users but how can I filter for the ones that appear only in the service center?
I tried through the entities User_Developer, ServiceCenter_Role but with no positive results.

Thank you in advance.


Best Regards,

Luis Machado.

Solution

Luis Machado wrote:

Hi there!

How can I fetch service center users with an aggregate/SQL query?
With the entity User I can get all Users but how can I filter for the ones that appear only in the service center?
I tried through the entities User_Developer, ServiceCenter_Role but with no positive results.

Thank you in advance.


Best Regards,

Luis Machado.



Hello Luis,

have you tried to filter by the tenant? Service Center users have a specific tenant id.

Solution

Luis Machado wrote:

Hi there!

How can I fetch service center users with an aggregate/SQL query?
With the entity User I can get all Users but how can I filter for the ones that appear only in the service center?
I tried through the entities User_Developer, ServiceCenter_Role but with no positive results.

Thank you in advance.


Best Regards,

Luis Machado.

Hi Luis,

Below query works for me. Try that

select * from ossys_user, ossys_tenant
where ossys_user.tenant_id = ossys_tenant.id
and ossys_tenant.name = 'ServiceCenter'


Thanks,

Sachin

Filipe Costa wrote:

Luis Machado wrote:

Hi there!

How can I fetch service center users with an aggregate/SQL query?
With the entity User I can get all Users but how can I filter for the ones that appear only in the service center?
I tried through the entities User_Developer, ServiceCenter_Role but with no positive results.

Thank you in advance.


Best Regards,

Luis Machado.



Hello Luis,

have you tried to filter by the tenant? Service Center users have a specific tenant id.

Thank you both for your answers but I used @Filipe Costa solution. Now I have all service center users.