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 / Filter user assigned g...
Power Apps
Unanswered

Filter user assigned gallery items

(0) ShareShare
ReportReport
Posted on by 10

Hi,

 

I can't figure out this problem. I'm using SharePoint Lists as a database for this simple Customer Register -app.

 

App has to filter from Gallery those customers that has assigned to signed user and also all others customers. It has 4 different searchboxes. You also need to be able to search for customers on the search box terms. Also it has 2 buttons: My Customers and  All Customers. These buttons specify which customers are listed in the gallery. This is how it looks like:CustomerRegister.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Everything else works pretty nice. Only problems is this: If those customers that has assigned to user and doesn't have Person ID > MyCustomers Filter formula won't show those customers in filtered Gallery. 

 

This is formula what I using in Gallery.Items:


If(Tab="MyCustomers"; Filter(BasicInfo; CurrentUser.Email = AssignedToMe.Email; StartsWith(CustomerNumber; TextInput1.Text); StartsWith(PersonId; TextInput2.Text); StartsWith(FirstName; TextInput3.Text); StartsWith(LastName; TextInput4.Text)); Tab="AllCustomer"; Filter(BasicInfo; StartsWith(CustomerNumber; TextInput1.Text); StartsWith(PersonId; TextInput2.Text); StartsWith(FirstName; TextInput3.Text); StartsWith(LastName; TextInput4.Text));

How should this be done?

 

Categories:
I have the same question (0)
  • Leo09 Profile Picture
    212 on at

    How did you make the My Customers and  All Customers view of the gallery?

  • PAman Profile Picture
    10 on at

    I'll have Sharepoint List called: BacicInfo. It includes: Customer number, Person ID, first name and last name. Also it includes AssignedToMe column. This column type is: Person or Group and it choose those from Sharepoint Group: Members.

     

    Since customers must also be able to search by first name, last name, personal ID and customer number, search fields must be included in the same filtering.

     

    This how I trying to build it.

     

    MainScreen > OnStart :

    Set(CurrentUser; User())

     

    App has two buttons and they have this kind of formula.

     

    MyCustomers -button > OnSelect:

    Set(Tab; "MyCustomers")

    AllCustomers -button > OnSelect:

    Set(Tab; "AllCustomers")

     

    It has only one Gallery. This Gallery shows customers by different filtering formula >

     

    Gallery > Items:

    If(Tab="MyCustomers"; Filter(BasicInfo; CurrentUser.Email = AssignedToMe.Email;
    StartsWith(CustomerNumber; TextInput1.Text);
    StartsWith(PersonId; TextInput2.Text);
    StartsWith(FirstName; TextInput3.Text);
    StartsWith(LastName; TextInput4.Text));
    
    Tab="AllCustomer"; Filter(BasicInfo;
    StartsWith(CustomerNumber; TextInput1.Text);
    StartsWith(PersonId; TextInput2.Text);
    StartsWith(FirstName; TextInput3.Text);
    StartsWith(LastName; TextInput4.Text));

     

    Only this code separates the views from each other:

     

    CurrentUser.Email = AssignedToMe.Email;

     

  • PAman Profile Picture
    10 on at

    @Leo09 wrote:

    How did you make the My Customers and  All Customers view of the gallery?

     

     


    Did I explain enough?

  • ThatAPIGuy Profile Picture
    925 on at

    Hi @PAman

     

    Make this change  -

     

    If(Tab="MyCustomers"; Filter(BasicInfo;AssignedToMe= CurrentUser.Email;

    As you are filtering the column AssignedToMe, the formula should include the column name first and then the value you are comparing it to.

     

    I am assuming that the AssignedToMe column contains the e-mail id of the users. 

     

    Hope this helps! Let me know if you have any questions.

     

     



  • PAman Profile Picture
    10 on at

    @ThatAPIGuy wrote:

    Hi @PAman

     

    Make this change  -

     

    If(Tab="MyCustomers"; Filter(BasicInfo;AssignedToMe= CurrentUser.Email;

    As you are filtering the column AssignedToMe, the formula should include the column name first and then the value you are comparing it to.

     

    I am assuming that the AssignedToMe column contains the e-mail id of the users. 

     

    Hope this helps! Let me know if you have any questions.

     

     




    Many thanks for the reply! But this change did not affect the outcome 😞

  • PAman Profile Picture
    10 on at

    Can anyone help me to find the solution?

  • PAman Profile Picture
    10 on at

    No ideas?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

    you have to specify the case, which you are describing. 

     

    That means that you have to write scenario for this case. Logicall way of this is to write If function which will be above the current one.

     

    E.g. if(has assigned to user && Person id=Blank(), value_true, *next scenario*)

     

    Have you thought about possibility that there is no logicall connector at all? How do you logically determine if the user is connected to another user if it has no Person ID? If its connected other way than just use in "value_true" this connection for showing.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard