Display in Web portal only Active employees.

Hello.

I need to define only active employees for employees which authorized to add and edit employees.

Via Web Designer in configure project I specify custom value with next web sql condition:

EXISTS (select 1 from (select uid_person from personinaerole where exists (select 1 from (select UID_AERole from AERole where Ident_AERole = 'Specialist SC') as x where x.UID_AERole=personinaerole.uid_aerole)) as X)

With that condition Employees with AERole = Specialist SC can see (edit) all employes in One Identity.

I try to extend my condition and wright something that: "and IsInActive = 0" but it's wrong.

How can specify to display only active employees and temporary disabled employees for employees with AE role = SpecialistSC?

  • Adding IsInactive = 0 should do what you want. Using query wizard I get:

    (IsInActive = 0) AND ( EXISTS ( SELECT 1 FROM (SELECT UID_Person FROM PersonInAERole WHERE EXISTS ( SELECT 1 FROM (SELECT UID_AERole FROM AERole WHERE Ident_AERole = N'Specialist SC') as X WHERE X.UID_AERole = PersonInAERole.UID_AERole ) ) as X WHERE X.UID_Person = Person.UID_Person) )

    but i prefer a query that avoids nested exists:

    exists ( select 1 from person p join PersonInAERole pir on pir.UID_Person = p.UID_Person join AERole r on r.UID_AERole = pir.UID_AERole where p.IsInActive = 0 and Ident_AERole = 'Specialist SC'
    and p.UID_Person = Person.UID_Person )

  • Hello, Craig
    Thank you. I have some question.

    Also I should edit option (Employees which can be edited by the current user) here I write:

    "uid_person in (select uid_person from QER_VEditEmployee where uid_personhead = '%useruid%' or isInActive = 0)
    or
    exists ( select 1 from PersonInAERole where UID_Person = '%useruid%' and UID_AERole in (select UID_AERole from AERole where Ident_AERole = 'Specialist SC'))"

    Have a problem, can't see correct number of employees,

    QER_VEditEmployee  what is this?

    Simple I try to select form DB UID_Person from Person where UID_PersonHead = 'ed6b7e2d-4477-4d93-998b-15039572bcc3 (uid with SC Specialit AERole)' or IsInActive = 0 - and I got correct number. But in Web Designer I can't use Person table without customization and didn't want add person collection.

    How can customize my condition with adding isInActive = 0 in my case?

  • QER_VEditEmployee is an SQL view listing the employees that can act as a manager for other employees. This includes any delegees the manager has configured.

    I think you have the isInactive in the wrong place. I would do the following:

    (
    uid_person in (select uid_person from QER_VEditEmployee where uid_personhead = '%useruid%'
    or
    exists ( select 1 from PersonInAERole where UID_Person = '%useruid%' and UID_AERole in (select UID_AERole from AERole where Ident_AERole = 'Specialist SC') )
    )
    and
    isInactive = 0

    Which translates to I can edit an active employee if I either have manager responsibilities for them or I am in the application role.

  • I am running a company about fashion so i want to host employee portal on my company site my nordstrom employee portal login how can i made it possible? and how much does it will cost?