
Announcements
If(
Self.Selected.Email = DefaultCurrentDirector.Email,
false,
If(
IsEmpty(
LookUp(
'Account Move - Hierarchy',
Director.Email = DefaultCurrentDirector.Email
).Directs
),
ClearCollect(
CurrentDirectorSubCollection,
ForAll(
Filter(
Office365Users.DirectReportsV2(Self.Selected.Email).value,
accountEnabled = true,
"SALES MANAGER" in Text(jobTitle)
),
If(
CountRows(Office365Users.DirectReportsV2(mail).value) > 0,
{
Claims: "i:0#.f|membership|" & mail,
Department: "",
DisplayName: displayName,
Email: mail,
JobTitle: jobTitle,
Picture: ""
}
)
)
);
UpdateContext({ResetCurrentManager: true});
Set(
DefaultCurrentManager,
Blank()
);
UpdateContext({ResetCurrentManager: false});
UpdateContext({ResetCurrentPrime: true});
Set(
DefaultCurrentPrime,
Blank()
);
UpdateContext({ResetCurrentPrime: false})/*,
ClearCollect(
CurrentDirectorSubCollection,
ForAll(
LookUp(
'Account Move - Hierarchy',
Director.Email = DefaultCurrentDirector.Email
).Directs,
{
Claims: "i:0#.f|membership|" & mail,
Department: "",
DisplayName: displayName,
Email: mail,
JobTitle: jobTitle,
Picture: ""
}
)
)
;
UpdateContext({ResetCurrentManager: true});
Set(
DefaultCurrentManager,
Blank()
);
UpdateContext({ResetCurrentManager: false});
UpdateContext({ResetCurrentPrime: true});
Set(
DefaultCurrentPrime,
Blank()
);
UpdateContext({ResetCurrentPrime: false})*/
)
);
ClearCollect(
CurrentDirectorSubCollection,
ForAll(
LookUp(
'Account Move - Hierarchy',
Director.Email = DefaultCurrentDirector.Email
).Directs,
{
Claims: "i:0#.f|membership|" & mail,
Department: "",
DisplayName: displayName,
Email: mail,
JobTitle: jobTitle,
Picture: ""
}
)
)
ClearCollect(
CurrentDirectorSubCollection,
Table(
LookUp(
'Account Move - Hierarchy',
Director.Email = DefaultCurrentDirector.Email
).Directs
)
);