I am currently working on a ticketing system and ran into some issues that I cannot figure out how to solve.
On the main screen, you are able to see every single ticket that was made. When the user inputs the ticket ID number or the ticket's title, the gallery would display what the user is looking for.
What I am trying to do is add two more filters.
Below is what I currently have:
If(IsBlank(TextSearchBox1.Text), SortByColumns(Filter(Tickets, Filter(Tickets, StartsWith(Title, TextSearchBox1.Text)), "ID"),ThisItem.Name = Office365Users.UserProfile() , If(SortDescending1, Descending, Ascending)), If(IsNumeric(Value(TextSearchBox1.Text)), SortByColumns(Filter(Tickets, ID = Value(TextSearchBox1.Text)), "ID", If(SortDescending1, Descending, Ascending)), SortByColumns(Filter(Tickets, StartsWith(Title, TextSearchBox1.Text)), "ID", If(SortDescending1, Descending, Ascending))))
I dont know if you can have multiple filters nested within each other or I am getting confused.
for example in my app I have the following multiple filter:
If(Dropdown_Filter.Selected.Value="FILTER NEW", Filter('[dbo].[SuggestionBox]',TicketStatus="NEW"),If(Dropdown_Filter.Selected.Value="FILTER ON HOLD", Filter('[dbo].[SuggestionBox]',TicketStatus="ON HOLD"), If(Dropdown_Filter.Selected.Value="FILTER CLOSED", Filter('[dbo].[SuggestionBox]',TicketStatus="CLOSED"),If(Dropdown_Filter.Selected.Value="FILTER IN PROCESS", Filter('[dbo].[SuggestionBox]',TicketStatus="IN PROCESS"),'[dbo].[SuggestionBox]'))))
Its pretty straight forward.This formula above assigned to ITEMS in the Gallery.Works great so far.
@Daemagor wrote:I dont know if you can have multiple filters nested within each other or I am getting confused.
Hi,
You can add more conditions to a filter in three ways:
Filter(datasource,And(condition1,condition2))
Filter(datasource,condition1 && condition2)
Filter(datasource,condition1,condition2,conditionx)
I have one more question for this extravagent piece of a puzzle I have.
If(IsBlank(TextSearchBox1.Text), SortByColumns(Filter(Tickets, StartsWith(Title, TextSearchBox1.Text), ThisItem.Name.DisplayName = User().FullName && ThisItem.Status.Value <> "Completed"), "ID", If(SortDescending1, Descending, Ascending)), If(IsNumeric(Value(TextSearchBox1.Text)), SortByColumns(Filter(Tickets, ID = Value(TextSearchBox1.Text)), "ID", If(SortDescending1, Descending, Ascending)), SortByColumns(Filter(Tickets, StartsWith(Title, TextSearchBox1.Text)), "ID", If(SortDescending1, Descending, Ascending))))
The part where I have multiple filters is where its throwing an error.
ThisItem.Name.DisplayName = User().FullName && ThisItem.Status.Value <> "Completed")
ThisItem.Name.DisplayName & ThisItem.Status.Value have: Invalid use of "."
FullName: Part of this filter formula cannot be evaluated remotly due to service limitions.
FullName isnt an issue when this goes into production from what I have seen in the past, unless you see it as one.
Error is not going away. I do not understand why a label can use ThisItem.Name.DisplayName and display the name but when you use it with the filter, it complains aout "."
Can you create a label and push ThisItem.Name.DisplayName to it value and then use Label.Text in the filter formula?
@Anonymous,
No I cannot, it gives me an error: This rule creates a circular reference between properties, which is not allowed. A property cannot reference itself or other properties affected by its value.
SortByColumns(Filter(Tickets, StartsWith(Title, TextSearchBox1.Text) && Ticket_Creator.Text), "ID", If(SortDescending1, Descending, Ascending))
Do I understand that you are having issue with filtering a people/group column by the current powerapp user name?
Try
User().FullName in Team.DisplayName
Hello Mr.Dang,
Greetings for the day ! Happy to contact you back,
Below is the powerapp which i am using to filter the gallery(documents) from the sharepoint library.
I have tried with many filter possibilites but it works either ways but i am looking for 2 sort of filters at a same time and also to download the multiple documents using checkbox.
1. Is it possible to filter the gallery by selecting values from the dropdown individually, For Ex: if i select training level "- " , i need to see or filter only training level documents which was defined in the sharepoint doc library and same way goes to all the dropdown, Application, Package, Language, etc. What i meant is more the filter applies to dropdown it should start filtering the gallery with matching criteria.Well i am using Distinct(Table,Column name) for the all the drop downs to fetch the values.
And also i need to see all the documents from the sharepoint library without any filter, later when i select Application "general" it should filter only Application which is avaliable, later when Application selected and training level selected should match both and provide output and same way goes to all the dropdowns.
2. Second approch, If i set values to all the dropdowns according to the selection i need see the results in the gallery.
3. There is a displaymode set to the below 3 dropdowns, i have value in training level when i select "-" other two dropdowns will be invalid.
4.. On Items for gallery, like i said it works either ways(since i am using "And"/"Or"). So it is either working for "And" otherwise "Or " Sort(Filter('Test Document',And(Training_x0020_Level=Dropdown1.Selected.Value,Application.Value=Dropdown2.Selected.Value,Package.Value=Dropdown3.Selected.Value,Language.Value=Dropdown4.Selected.Value,Medium.Value=Dropdown5.Selected.Value)),Modified,Descending). In my case it should work for both.
Is it possible to download multiple files within the gallery, in my case i have gallery which has a document library from Sharepoint.
And i have added the checkbox controller to the gallery, so that when needed user can select the multiple documents using checkbox and download in zip file or normal download but do we have any command to establish this issue? However i can dowload or launch the single file at a time.
Thanks and Regards,
Nikhil.
Please do not "hijack" this thread and revive an old thread, create a new thread next time.
Thank You,
~ Dae