web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch one items access...
Power Apps
Unanswered

Patch one items access level, while patching all people manager items

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi guys,

 

I am trying to do a patch function within powerapps which allows me to delegate certain access levels to employees.

mikecampbell260_0-1697035966923.png

The image above shows the screen a manager would see. Basically what I am trying to do, is patch the headcount data source, and update the advisors access level based on what access level I have selected in dropdown2. However, as well as this, I want it to patch EVERY item in the table where I employees managers, and make the person I have selected all of their managers.

 

Example would be as follows:

 

I select steve in dropdown1 and I want him to be a manager role, the patch then updates steves access level to manager. Then the patch also updates every item in the table where I was the manager, and make the name in dropdown1 selected, the manager instead of me in the datasource.

 

Unsure if that makes sense but any help would be appreciated

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,960 Moderator on at

    Hi @Anonymous 

     

    You have to provide us with Table or List names, field names etc, before we can help. There isn't a way to really show you with out.

     

    I do not know what Access means but is it a Choice column? Is that a drop down control or a combobox (I believe combox), can you select just 1 or more Delegations at time?

     

    For patching all the records to make him their manager, we would need the field type and name (I am assuming its Person (SharePoint) or lookup (Dataverse) or other?


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you want to update the manager column as the dropdown1 selected user?

    Could you please show me a sample about your data source?

     

    Actually I am not sure if you have a standard Manager column where saving you as the manager, anyway, here is a solution I guess that you have a Manager column, and once you select Manager from the dropdown2, you will update the whol Manager column as dropdown1 selected user.

     

    I assume you populate the Dropdown1 with office365users....

    Set the patch button OnSelect as:

    If(!IsBlank(ComboBox1.Selected.Email),UpdateIf(list,Manager.Email=User().Email,{Manager:ComboBox1.Selected}))

    Also, to update the advisors access level based on what access level you have selected in dropdown2, you need to write the follwoing formula:

    If(!IsBlank(ComboBox1.Selected.Email)&&!IsBlank(ComboBox2.Selected.Email),Patch(AccessLevel_list,LookUp(AccessLevel_list,UserColumn.Email=ComboBox1.Selected.Email),{AccessLvel:ComboBox2.Selected.Value}))​

    Here I assume that your accesslevel list has a person column to save the user name and a text type AccessLevel column to save the selected level.

     

    Of course you could combine the above two formulas as below:

    If(!IsBlank(ComboBox1.Selected.Email)&&!IsBlank(ComboBox2.Selected.Email),
    UpdateIf(list,Manager.Email=User().Email,{Manager:ComboBox1.Selected})&&Patch(AccessLevel_list,LookUp(AccessLevel_list,UserColumn.Email=ComboBox1.Selected.Email),{AccessLvel:ComboBox2.Selected.Value}))​​
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi there,

     

    yes sorry, the data source is coming from an sql database. Whereby each row is a new "Advisor" and within that row there is a manager column, as well as what access level they have. see below, thank you

    mikecampbell260_0-1697187262324.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#2
Haque Profile Picture

Haque 69

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard