My datasource is an excel file. I have records being displayed in a gallery. Each record has a "Status" column either Open or Closed. I want to hide record(s) in the gallery if the "Status" column value is "Closed". Right now, this is what is on my Items property:
SortByColumns(
Search(
[@LogTable],
TextSearchBox1.Text,
"DetailedDescription",
"FunctionalArea",
"Submittedby",
"ShortTitle",
"Status"
),
"Submittedby",
If(
SortDescending1,
Descending,
Ascending
)
)
Solved! Go to Solution.
Sorry for all the back and forth, I've been doing this freetext without building a test in PowerApps itself. I see another error in my code. Try this:
SortByColumns(
Search(
Filter([@LogTable],Status="Open"),
TextSearchBox1.Text,
"DetailedDescription",
"FunctionalArea",
"Submittedby",
"ShortTitle",
"Status"
)
,"Submittedby",
If(
SortDescending1,
Descending,
Ascending
)
)
You'll just need to add a filter.
SortByColumns(
Filter(
Search(
[@LogTable],
TextSearchBox1.Text,
"DetailedDescription",
"FunctionalArea",
"Submittedby",
"ShortTitle",
"Status"
),
"Submittedby",
If(
SortDescending1,
Descending,
Ascending
)
,Status,"Open")
)
I see. The SortByColumns arguments got shifted when I was typing it out. Try this
SortByColumns(
Filter(
Search(
[@LogTable],
TextSearchBox1.Text,
"DetailedDescription",
"FunctionalArea",
"Submittedby",
"ShortTitle",
"Status"
)
,Status,"Open")
,"Submittedby",
If(
SortDescending1,
Descending,
Ascending
)
)
@Anonymous, no error now but gallery is blank and giving me a triangular exclamation Warning: This predicate is a literal value and does not reference the input table.
Maybe we need to flip the Search and Filter functions. Try this:
SortByColumns(
Search(
Filter([@LogTable],Status,"Open"),
TextSearchBox1.Text,
"DetailedDescription",
"FunctionalArea",
"Submittedby",
"ShortTitle",
"Status"
)
,"Submittedby",
If(
SortDescending1,
Descending,
Ascending
)
)
@Anonymous, still the same warning and still blank.
Sorry for all the back and forth, I've been doing this freetext without building a test in PowerApps itself. I see another error in my code. Try this:
SortByColumns(
Search(
Filter([@LogTable],Status="Open"),
TextSearchBox1.Text,
"DetailedDescription",
"FunctionalArea",
"Submittedby",
"ShortTitle",
"Status"
)
,"Submittedby",
If(
SortDescending1,
Descending,
Ascending
)
)
@Anonymous, that resolves all the errors now. appreciate your time looking into this.
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |