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 / Power Apps formula for...
Power Apps
Unanswered

Power Apps formula for displaying created user and other users the form is assigned to

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I have a Canvas App form, linked to SPO list.

I've got the main screen where users complete the form Section A, when the user submits the form, I'd like them to be able to view what they have submitted, so I have created a View Screen (I'm unsure how to direct users to this screen) on this view screen I have a Gallery and an Edit Form, and on the Items property of the Gallery I have set the Fx to: Filter('ListName', 'Created By'.Email = User().Email) to filter only the items the user has submitted. But I would also like the user who is specified in the 'supervisor' field to be able to view the item(s) with only 1 field editable by them the 'senior manager' field.

I'd then like the senior manager to be able to view the entire form, but only be able to edit Section B.

Furthermore I'd like a set of users to be able to view all the items regardless of who submitted them.

Can someone please advise how I achieve this?

 

Thanks

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    What does this sentence mean "But I would also like the user who is specified in the 'supervisor' field to be able to view the item(s) with only 1 field editable by them the 'senior manager' field."? Does the supervisor field mean the user's Manager?

     

    1. Put code to OnStart of App to check if the user has assigned the Manager field

    Set(HasManager, !IsBlankOrError(Office365Users.ManagerV2(<User ID>)))

    2. Set the DisplayMode of data card to If(HasManager, DisplayMode.View,DisplayMode.Edit) , then it will in view mode if user has Manger.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft 

    What I meant by that sentence is, I have a field called Supervisor on my form, user1 completes the form and types in the supervisor name. The supervisor must be able to view the entire form Section A and Section B, but only be able to edit 1 field, this is the Manager field, which I also have on my form. There are 2 scenarios, either User1 enters both the supervisor and manager name in the seperate fields, or the supervisor enters this when his/her name is entered and an email is triggered.

    I'm assuming the fx you have mentioned, is if the manager field on the users profile if complete? I'm specifically looking to allow whoever the person in the Manager field is, that individual to be able to complete Section B.

    I hope that makes more sense?

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous,

    oh, I see.

    My suggestion is to duplicate the form, Form1 is for users and Form2 is for supervisor, because it is too complex to modify all data cards property.

    At the start of the app, first to check if the login user is supervisor, and navigate to Form2 that only has one editable card.

    As well as the senior manager, check the login account, then navigate Section B form.

    Set OnStart property of App: 

     

    If(User().Email in 'SP list'.Supervisor, Navigate('Form2Screen'), User().Email in 'SP list'.Manager, Navigate('SectionBFormScreen'), Navigate('Form1Screen'))

     

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Thanks

    So put Section A on 1 screen and Section B on another?

    As I need the person who completes Section A to be able to only view Section B.

    Also on the App start up i have the following fx to allow users to directly get to the completed forms, and so it can email supervisor/manager the link to the form:

    Set(VarID, Value(Param("MYID")));
    If(VarID <> 0, Set(VarRecord, LookUp('List', ID = VarID));Navigate(ViewScreen))

    Would by having another fx that you mention work well together?

    Also in you fx you mention 

    If(User().Email in 'SP list'.Supervisor, 

    But i need the form to look at DatacardValue16 to determine who the supervisor is, as the form is relying on whoever is entered as the supervisor/manager, regardless of if they have supervisor or manager in there profile in o365.

     

    Thanks

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard