I’m trying to get a text box to appear within a gallery item but only if the selectable person has Direct Reports (people reporting to him/her). If the person was selected, and no one appeared as a direct report, then that person would not have direct reports. Essentially how the App works is that, if the person shown in the dark green box has Direct Reports, they appear in the bottom section in the light green boxes. If no Direct Reports exist, there will be no light green boxes (see the attached images – info redacted due to pulling from an Active Directory – PII). The blue box just shows the manager for the dark green box employee (not important for what I’m trying to do).
I’m trying to make it so if someone in the light green area has Direct Reports, a text box will appear in their box that says something like “Click Here to View Direct Reports”. If they don’t have any, then the box would just be blank/invisible.Ā
I’m trying to set up the bottom section so that the equation always applies (not “OnClick”). The equation used to pull in the Direct Reports is “Office365Users.DirectReportsV2(varTopManager).value” (minus the quotes). varTopManager is a variable that is defined on App Start that simply says that a specific person is the TopManager so that the dark green box knows where to start in the Org Chart. The variable updates as each light green person is selected to the person that is selected.
I’m new to PowerApps, and I wasn’t great at coding in high school (still am not), so trying to troubleshoot code to make it look for Direct Reports for a “ThisItem” or possibly a “Parent” item is difficult for me.
This is the code I was trying to use in the text box: “If(IsBlank(Office365Users.DirectReportsV2(ThisItem.userPrincipalName).value),”Click to View Subordinates”,””)” (no outside quotes).
The text box propagates to all other light green direct reports if they are present, since it’s a Gallery item.
—————————— Christopher West ——————————
Guy Boswell
Member
July 4, 2022 at 8:31 AM
Hi Hate to see an unanswered query but don’t have the whole answer.Ā If I was you I would be thinking of counting the number of direct reports and displaying the direct reports gallery if the count greater than zero Good luck GUy ?
—————————— Guy Boswell Care for the Family Newport 02920810800 —————————— ——————————————-
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!