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 only non-blank...
Power Apps
Answered

Display only non-blank values in a SharePoint list and to show data submitted by the current logged in user

(0) ShareShare
ReportReport
Posted on by 986

Hi everyone,
I am being looking for a solution for my requirement but I have not found it for my queries which are as follows:
1:

I have created a Additional details form (which every user has to fill in when they login to the application {if they have not filled it}) which is:

Sidhant_02_0-1680502873596.png

And to save this details I have created a SharePoint list named AdditionalDetails (in Power apps it is named AdditionalDetails_1 after connecting it with my application)
Now once user fills the details they are navigated to Home page where in I have a provided a button to see the additional details that they have filled. I want to display the additional details of the user who is logged in
So for example: I have a LoginList (which stores all the credentials of all users for the app)
Lets say: Jimmy is a user in the List, so now if I login using Jimmy's credentials (Username: jim Pass: 1234) -> Fill the additional details form -> Submit it and Go to Home Page -> Navigate to Additional Details page: In this page I just want to show Jimmy's additional no other records (no blank values as well) {it should filter out based on Login List user credentials not by Office365 account details}

AdditionalDetails (Share Point list):

Sidhant_02_1-1680503242903.png


Login List:
Header: 

Sidhant_02_2-1680503331053.png

 

Sidhant_02_3-1680503350441.png



So I did try using Lookup function (inside ForAll) and tried comparing the Email field from the SharePoint List (AdditionalDetails_1) with the sharepoint list LoginList to check Email from both is matching for current logged user, but I was not getting the expected result:

Sidhant_02_5-1680503608124.png

 

Sidhant_02_4-1680503591303.png


As you can see in the above 2 images: I have logged in using Test user credentials (where the additional details are already filled in) but here I am able to see all additional details of other users as well  and some blank rows

Sidhant_02_6-1680503733648.png


To compare the values from 2 different sharepoint list (here I email) I have used '@' , through one post I came across:
Reference to check a value in two different sharepoint list 


Logic on the Gallery on ViewAdditional Details page. I did try using RemoveIf but that's not allowed (had referred: https://powerusers.microsoft.com/t5/Building-Power-Apps/How-do-I-delete-empty-rows-in-a-table-collection/m-p/2076143#M519134) - it might be for collection.

Can anyone please help with this. I have created a detailed query for the same (the actual requirement that I have: 60% percent is completed, now only the last step is remaining) and this query is subset of the main query:
Main Query: Additional Details  

Also I have some queries that I have posted on Forum (for which I need answers as well), so do have a look at those as well, I have mentioned the links below:
1. Block User after few incorrect attempts 
2. Editing the Gallery on the go 

If you guys have time do check and reply: @WarrenBelz @KeithAtherton , @Ramole , @timl 

Regards,
Sidhant

Categories:
I have the same question (0)
  • HenWang Profile Picture
    Microsoft Employee on at

    Hi @Sidhant_02 ,

     

    For this issue, you don’t need to use the Forall function. If the email value inside these two lists are the same, then you can just use Filter function to find out the exact record related to the single user “Jimmy”.

     

    I don’t know what is it inside your submit button of the AdditionalDetails_1 form, but if I were you, I will use patch function to patch the value Jimmy write into the AdditionalDetails_1 list when Jimmy is clicking on the submit button.

     

    After this, you need to create a variable to store the email value written by Jimmy and then we can use this variable to compare and find out the only one existing record that belongs to Jimmy only.

     

    Inside the login button, please add this formula at the end:

     

    Set(varEmail,TextInput2_3.Text)    //please replace the textinput2_3 with your own textinput name.

     

    HenWang_0-1680592443038.png

     

     

     

    Then please change the items property of the gallery as below formula:

     

    Filter(AdditionalDetails_1,Email = varEmail)

     

    Then Jimmy will be able to see his own record.

     

    Best Regards,

    Hen Wang

  • Sidhant_02 Profile Picture
    986 on at

    Hi @HenWang ,
    Thanks for the response. This is the code on Submit button of the Additional Details page:

    Sidhant_02_0-1680594402500.png

    Also I created the variable and used it which has the email value, in my case the textinput field in the additional details page is called 'eMail'

    Sidhant_02_1-1680594497493.png


    So on Login screen I added the line which you mentioned in your response

    Sidhant_02_2-1680594546681.png


    But for logging-in , I am using the Username (which is called as Title in the sharePoint list) to login in the application (not email)

    Sidhant_02_3-1680594627059.png


    And when I used the filter condition on the ViewAdditionalDetails page it is not displaying any result:

    Sidhant_02_4-1680594838968.png
    In the above image (I have logged in with Kimmy; in which I have given my email id still cannot see any result)

    Sidhant_02_0-1680595082776.png

     

    So is it because after the user fills the additional details, I am clearing out all the fields using Reset so it might get empty value in the variable (varCheck) that we have used on Login button (at end), because I need to clear all the values once the data is submitted in Additional Details form?

    Regards,
    Sidhant

  • Verified answer
    HenWang Profile Picture
    Microsoft Employee on at

    Hi @Sidhant_02 

     

    Understand now, for the login action, Jimmy will only type his user name and Password. In this case, you need to re-create the User name variable instead of the “Email” variable exactly during the login step.

     

    1.Go to the login button, add below formula exactly before you Reset the two textinput controls.

     

    Navigate(Screen);     //example formula

    Set(varUserName, TextInput1.Text);   //I guess it’s this “TextInput1” control, please change it if I am wrong

     

    Reset(TextInput1);

    Reset(TextInput2)

     

    2.Change the Filter function in your AdditionalDetails Screen:

     

    Filter(AdditionalDetails_1,Title = varUserName)

     

    3.Also, remember to remove the old variable varEmail from your app.

     

    Best Regards,

    Hen Wang

  • Sidhant_02 Profile Picture
    986 on at

    Thank you @HenWang ,
    It is working now, I am able to see the additional details for the respective user.
    Before: 

    Sidhant_02_1-1680599081388.png


    After:

    Sidhant_02_0-1680599058446.png
    Could you just let me know how to edit the records if a user wants to (on the above page)?.
    And also if possible could you please have a look at my second query which was regarding to block a user for a time period if they enter incorrect details during login for security purpose and editing a Gallery on the Go, I have mentioned the links below.
    1. Block User after Incorrect Attempts 
    2. Editing the Gallery on the Go (This query was marked as solved by mistake it is still not solved. The solution that I have written was for some other query)
    So if you could you have a look at the above 2 queries it would be helpful.

    Once again Thanks for the quick response.

    Regards,
    Sidhant

  • Sidhant_02 Profile Picture
    986 on at

    Hi @HenWang ,
    Scenario: 
    Assume there are  two users in my application 
    Sam : Admin            Mary: Employee
    So now that we added a Filter condition to show Additional data to current logged in user by using a variable on the login page (the solution which you gave).
    Assume that Sam (administrator: Role) logins in the application then he must be able to view all the records and even can edit them:

    Sidhant_02_0-1682504411033.png

    So now if I want the admin to see all the records (and even give the permission to edit), so should I create a duplicate of the page and in Items property directly give the SharePoint List name: AdditionalDetails_1

    Sidhant_02_1-1682504696113.png

    Wanted to show all the records (Additional details) to the Administrator: User Role in the above format. Do let me know is it correct or any corrections are required?.

    Regards,
    Sidhant

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
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard