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 / Display Line Items onl...
Power Apps
Answered

Display Line Items only from User who created form

(0) ShareShare
ReportReport
Posted on by 84

Good morning everyone,

 

Hope all is well. I am having an issue this morning with one of my galleries and the issue is trying to display the forms info of the user who created the form. Whenever I have a VP create a Job Requisition form they should only be able to see the form's they created, but they are seeing all the forms created by the other VP. How would I be able to get the gallery to only display the forms created by that user? I am going to attach an image of the picture and the code I have of the items. 

 

AllRequest.PNGItemsAllRequest.PNG

 

Thanks for the help!

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ajilakes 

    You can filter the information based on the current user.

    Your formula would become this:

    SortByColumns(
     Search(
     Filter('Job Requisition Form List', 'Created By'.Email = User().Email),
     TextInputSearch.Text,
     "Title", "EmployeeName", "Requetor"),
     SortColumn,
     If(SortDescending, Descending, Ascending)
    )

    Only the items created by the current user (based on email address) will be searched and therefore displayed.

     

    I hope this is helpful for you.

  • Ajilakes Profile Picture
    84 on at

    Hi @RandyHayes ,

     

    I was able to get the filter set, but the user is still able to see the request created. I tried the way you provided, but it never displayed any items. Is their something I am doing wrong?

    I will attach the image of the update Job Request

     

    UpdateAllRequest.PNG

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ajilakes 

    Is UserEmail set somewhere in your app to User().Email?  And if so, is it getting set.

    Next point - you had stated about users only being able to see items that they created.  Normally in SharePoint, every record contains a Created By column that records who created it.  Using this column in your filter and comparing to the current user will be sufficient to filter only records they have created.

    However, given the above statement - if you are somehow recording or identifying the creator of the record within your data in another column, then you can certainly use that in your filter instead.

    I cannot determine from your picture which column it is that you are expecting to be based on the current user. Are you looking at the Employee Name or Requestor as your indicator of success or failure?

  • Ajilakes Profile Picture
    84 on at

    Hi @RandyHayes .

     

    We have the UserEmail set up in the beginning by displaying the user's info who's going to create the Form. I am going to attach an image of the OnVisible Code I have for that page. I am doing everything you told me, but when I create a form in the app other users are able to see what I created. 

     

    On the other screen is where the gallery is displayed and what we want to do here is whenever the user creates a Form; that form appears for the user and not for everyone else. The forms that are displayed have to be matched to the user creating the form and they are not allowed to see any other forms created by other users. 

     

    If you can assist me with this that would be great! Look forward to your response,

     

    NewAllRequest.PNGSPInfo.PNGUserInfo.PNG

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ajilakes 

    Okay...let's review a few things here:

    1) Have to state this in case you are not aware...filtering and hiding data from your SharePoint list does NOT keep people from actually accessing the information in other records. Although your App may obscure the data, the fact that a user has to have access to the list to be able to read and write to it means that they have access to every record.  IF you want to control this, the only option you have in SharePoint is to enable Item-Level permissions in the SharePoint list advance settings.  However, this changes the list.

     

    2) Your filter, regardless, is not working properly.  Let's try a couple things:

    a. change the filter part of your formula so we're comparing apples to apples to the following:  

       ..lumns(Search(Filter('Job Requisition Form List', Lower('Created By'.Email) = Lower(UserEmail)), TextInputSear...

    b. Place another test label in your gallery and set the text to : ThisItem.'Created By'.Email

    c. Place a test label somewhere on your screen and set the text to: UserEmail

    What we're looking for is (hopefully success in a.) a list that shows the created by column and another label that shows the user email value you have in your variable.  Compare those two and make sure things look proper.

     

    Let's start with that and see where that leads us.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard