Hello,
I’m new to building PowerApps and programming. So, I hope there is a patient person there who can help me with applying a filter to my gallery.
My app is created against the SharePoint list.
1. What I plan is when the user click the button, it will bring them to the list that has been submitted by the user.
2. Here is my form, the user can choose the category but I don't know how to make it the submission will be directly saved in the specific category button.
3. My SharePoint
I try to use this coding on the gallery but the list will not come out:
Sort(
Filter(
'Inventory Management',
Category = "Office"
)
)
Solved! Go to Solution.
Hi @SBax ,
Firstly @SBax has done all the work here, so please accept his efforts. You have two problems, both stemming from the Choice column. Firstly (the easy bit), you need .Value after the reference as a Choice column is a complex field type (a Table with one column called Value). The second bigger issue with using these columns (unless you have to) is you cannot sort by them in a Delegable manner. The below will work
Sort(
AddColumns(
Filter(
'Inventory Management',
Category.Value = "Office"
),
"Cat",
Category.Value
),
Cat
)
I have a blog on field types that may interest you.
Your filter part is correct but you haven't entered a column to sort by
Example syntax:
Sort'(Ice Cream' flavour)
ice cream is your data and flavour is the column you are sorting by.
So you need something like
Sort(Filter(
'Inventory Management',
Category = "Office"
), *Insert name of column you want to sort by here*)
Thank you for your reply, I have tried your solution word for word but it didn't work.
1. There was an error in the Sort function
2. Is this related to my column format as I set it as a choice, not a single-line text?
Hope you can help me. Thank you!
Hi,
Sorry, I assumed it was a text field
For choice columns, you need to add ".text"
Sort(
Filter(
'Inventory Management',
Category.text = "Office"
),
Category)
I literally followed your solution but it still did not work.
It said that "text" isn't recognized, Does I need to set "text" somewhere in the gallery?
@D_Izani Apologies, I'm mixing up JavaScript and Power FX try .value in place of the .text
If this does not work, please share the eroor
Alright, let me share the errors:
1.
2.
3.
4.
It would be really helpful if you could help me to solve the errors. Thank you!
I've just got to pop out for the afternoon, but will jump onto my laptop when I get home and attempt to replicate this
Alright, thank you and hope to hear from you soon.
Quick question, is company a choice column or plain text?
User | Count |
---|---|
256 | |
106 | |
92 | |
47 | |
37 |