Hi all, I want to add a button to sort my data, I wish it can sort by the version ascending/decreasing.
The grammar of my data gallery as below:
I don't know how to add the grammar to the button & data gallery...please help...
Solved! Go to Solution.
@Anonymous ,
A bit more compact with the original syntax I posted
Sort(
Filter(
FIT,
StartsWith('Matrix Version',TextInput1.Text) &&
(Dropdown1.Selected.Result = Blank() || Title = Dropdown1.Selected.Result)
),
'Matrix Version',
If(
varsort,
Ascending,
Descending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Anonymous ,
Try this
Sort(
Filter(
FIT,
StartsWith(
'Matrix Version',
TextInput1.Text
) &&
(
Dropdown1.Selected.Result = Blank() ||
Title = Dropdown1.Selected.Result
)
),
Version
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Anonymous ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz ,
Sorry for my late reply & thanks for your help.
I'm new to power apps and I have no programming experience... so I'm still work on this problem.
I don't know why there is some errors after use your grammar, and how to use the button? Should I add grammar to the button?
I found the solution! This can be work:
Sort(If(Dropdown1.Selected.Result = Blank(),Filter(FIT,StartsWith('Matrix Version',TextInput1.Text)),
Filter(FIT, Title = Dropdown1.Selected.Result And StartsWith('Matrix Version',TextInput1.Text))),'Matrix Version',If(varsort,Ascending,Descending))
and the button use this, OnSelect:
UpdateContext({varsort:!varsort})
Hi @Anonymous ,
That code is for the Items of a gallery.
@Anonymous ,
A bit more compact with the original syntax I posted
Sort(
Filter(
FIT,
StartsWith('Matrix Version',TextInput1.Text) &&
(Dropdown1.Selected.Result = Blank() || Title = Dropdown1.Selected.Result)
),
'Matrix Version',
If(
varsort,
Ascending,
Descending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps