Morning,
Quick question here?
How can I sort my gallery items "Form a Share Point List" based on two conditions? I would like to have the items sorted first by Title "Single Line of Text" and then by ItemID "Number"
Thank in advance for any response.
Regards
Solved! Go to Solution.
Sort(Sort(Filter(LIPDatabase,CustomerID=Value(Label12.Text)),Title,Descending),ItemID,Ascending)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Put this code in the Items property of your Gallery
SortByColumns(your_datasource_name,"Title",Ascending,"ID",Ascending)
Link to SORTBYCOLUMNS Documentation
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thank you very much, Almost done. I also have a condition for the gallery.
I have the gallery sorted based on the value of a dropdown
SortByColumns(LIPDatabase,CustomerID=Value(Label12.Text),"Title",Ascending,"ItemID",Ascending)
I had this formula before and it was working fine but only sorting based on title
Sort(Filter(LIPDatabase,CustomerID=Value(Label12.Text)),Title,Descending)
Any idea?
Missed the filter out:
SortByColumns(Filter(LIPDatabase,CustomerID=Value(Label12.Text)),"Title",Ascending,"ItemID",Ascending)
Did you mean sorted by CustomerID or did you mean filtered? Please clarify.
SortByColumns(
Filter(
LIPDatabase,
CustomerID=Value(Label12.Text)
),
"Title",Ascending,
"ItemID",Ascending
)
Sorry, let me try to explain properly:
I have a dropdown "ComboBox3" = SortByColumns(LIPCustomers,"Title",Ascending)
I have a label "Label12" = LookUp(LIPCustomers,Title=ComboBox3.Selected.Title,ID)
My Gallery Itesm : Sort(Filter(LIPDatabase,CustomerID=Value(Label12.Text)),Title,Descending)
And I would like to have the items in my gallery sorted first By Title then by ItemID
Regards,
Sort(Sort(Filter(LIPDatabase,CustomerID=Value(Label12.Text)),Title,Descending),ItemID,Ascending)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Fantastic!!!
Thank you so much!
User | Count |
---|---|
139 | |
131 | |
75 | |
72 | |
70 |
User | Count |
---|---|
212 | |
200 | |
64 | |
63 | |
54 |