@Jensvth
@Jensvth wrote:
Unfortunately I still have a problem. A user occurs more often, for example he has the Status_Number 1, 4, 6, but I only see tickets with the number 1 for him
Yes, it is possible to solve this problem as well, but the solution for that will be substantially more complex than the solution I gave at first.

That means you have situation like this in List01, where for example a User "C" may have one or more records corresponding with a Status_Number, so in this example, you have a user "C" who has Status_Number of 3 and 4, as illustrated here.
The solution is possible in Power Apps Canvas App.
You can find the solution below.
In addition to detailed step-by-step instructions below on how to build the app from scratch,
I also have prepared a sample app this time (at bottom of this post) with simulated collections for the data source in case it helps you to have as a starting point.
Check below for steps to build from scratch, and sample app with instructions how to import the sample app:
Steps
- Create two blank screens Screen1 and Screen2
- Screen1 OnVisible property, put this formula:
ClearCollect(List01,{User:"A",Status_Number:1},{User:"B",Status_Number:2},{User:"C",Status_Number:3},{User:"C",Status_Number:4});
ClearCollect(Ticket_Information,{Ticket_Name_:"1_1",Status_Number:1},{Ticket_Name_:"1_2",Status_Number:1},{Ticket_Name_:"2_1",Status_Number:2},{Ticket_Name_:"2_2",Status_Number:2},{Ticket_Name_:"3_1",Status_Number:3},{Ticket_Name_:"3_2",Status_Number:3},{Ticket_Name_:"4_1",Status_Number:4},{Ticket_Name_:"4_2",Status_Number:4});
ClearCollect(tmp_Collection_Tickets_byCurrentStatusNumbers,{});
ClearCollect(Collection_Tickets_byCurrentStatusNumbers,Defaults(Ticket_Information));
Select(Button1);
- You will place all of the Controls in the next steps, on Screen1, leaving Screen2 blank.
- Place a Button Control Button1 and make it invisible (set Visible property to false)
- Button1 OnSelect property, put this formula:
Clear(tmp_Collection_Tickets_byCurrentStatusNumbers);
Clear(Collection_Tickets_byCurrentStatusNumbers);
Collect(
tmp_Collection_Tickets_byCurrentStatusNumbers
,With(
{
outerFilter:
Filter(
List01 As ThisUserRecord
,ThisUserRecord.User = TextInput1.Text
)
}
,ForAll(outerFilter As ThisUserRecordPreFilteredByUserSearch
,Filter(Ticket_Information,Status_Number = ThisUserRecordPreFilteredByUserSearch.Status_Number)
)
)
);
//Merge the multiple Collections
ForAll(
tmp_Collection_Tickets_byCurrentStatusNumbers
,Collect(Collection_Tickets_byCurrentStatusNumbers,ThisRecord.Value)
);
- Place Label Control Label1
- Label1 Text property: "User (type in A, B or C)"
- Place Label Control Label2
- Label2 Text property: "Status Number"
- Place Label Control Label3
- Label3 Text property:
With(
{str:Concat(Distinct(Collection_Tickets_byCurrentStatusNumbers,Status_Number),ThisRecord.Result & ",")}
,If(Len(str)<1,"~~NOT FOUND~~",Left(str,Len(str)-1))
)
- Place TextInput Control TextInput1
- TextInput1 Default property,: "C"
- TextInput1 OnChange property:
Select(Button1)
- Place Gallery Control Gallery1. Use the default Vertical Gallery template.
- Gallery1 Items property:
Collection_Tickets_byCurrentStatusNumbers
- Inside Gallery1, in the Label Control Subtitle1 , use this for the Text property:
ThisItem.Status_Number
- Toggle between Screen2 and Screen1 once or twice to see results immediately.
- You can preview the App and change the value of the Textbox to A, B, or C - and it should work correctly. If you use something like D, it should say "~~Not Found~~"
Working Sample msapp
I have also attached a working sample msapp file app25.msapp if you would like to import a full, working example yourself for your convenience.

To use the sample msapp attached, follow these steps:
1) Download the msapp file attached to this post (it is at the bottom of this post), to Desktop or a folder of your choice, by clicking on it from this post.
2) Create a new, blank Power App Canvas App
3) Go to File -> Open -> Browse

4) Navigate to location of .msapp file from Step 1, select it, and press the "Open" button.
5) The working example msapp file should load.
6) Toggle between Screen2 and Screen1 once or twice to see results immediately.
7) You can try the full working example and also check the working formulas and setup as well in the app.
😎 You can even try to add your SharePoint Lists as data sources in the sample app after you import it, and use your SharePoint List names instead of the Collection names throughout the App and it might work.
Check if it helps @Jensvth