
Announcements
The following works fine to add text to a label in a gallery:
LookUp(RemoteTable,proposal_no=ThisItem.proposal_no,name)
But as soon as I nest that within a Sort function, I can't use the ThisItem anymore (it gets the red squiggle). This is what I want to do:
Sort(If(ActiveToggle.Value=true,Filter(collection,date<Today() && Today() <date),collection),LookUp(RemoteTable,proposal_no=ThisItem.proposal_no,name))
If I just use proposal_no=proposal_no, it returns the same result for every record and doesn't sort right.
Any help?
Thanks!
Hi @kman42 ,
The funtion of Sort is used to sort a table.
I'm afraid it's not supported to use it to sort some labels currently.
If you want to sort the gallery according to the name column, I suggest tou set the gallery's Items:
Sort(If(ActiveToggle.Value=true,Filter(collection,date<Today() && Today() <date),collection),name)
Here's a doc about Sort for your reference:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort
Best regards,
Community Support Team _ Phoebe Liu