Hi
I tried searching, filtering and sorting my gallery and almost suceeded 😉
I get the text box, the sort functions and one drop down filter to work, but when i try to include the second drop down filter, I fail.
With this code, the first drop down is working just fine.
SortByColumns(
Search(
If(
DropdownStatus.Selected.Result = "Alle";
'Reporting Vermietung';
Filter(
'Reporting Vermietung';
'Status Text' = DropdownStatus.Selected.Result
)
);
TextSearchBox1_1.Text;
"Objekt";
"PFM";
"Status_x0020_Text";
"Mieter"
);
SortColumn;
If(
SortDescending1;
Descending;
Ascending
)
)
I tried to include the second filter drop down like this, but it's not working properly:
SortByColumns(
Search(
If(
DropdownStatus.Selected.Result = "Alle" || DropdownPFM.Selected.Result = "Alle";
'Reporting Vermietung';
Filter(
'Reporting Vermietung';
'Status Text' = DropdownStatus.Selected.Result || PFM = DropdownPFM.Selected.Result
)
);
TextSearchBox1_1.Text;
"Objekt";
"PFM";
"Status_x0020_Text";
"Mieter"
);
SortColumn;
If(
SortDescending1;
Descending;
Ascending
)
)
Many thanks in advance 🙂
Solved! Go to Solution.
Hi @marczh
Both Dropdown selection is optional now.
With(
{_Item: 'Reporting Vermietung'};
SortByColumns(
Search(
Filter(
_Item,
(DropdownStatus.Selected.Result = "Alle" || 'Status Text' = DropdownStatus.Selected.Result) && (DropdownPFM.Selected.Result = "Alle" || PFM = DropdownPFM.Selected.Result)
);
TextSearchBox1_1.Text;
"Objekt"
"PFM";
"Status_x0020_Text";
"Mieter"
);
SortColumn;
If(
SortDescending1;
Descending;
Ascending
)
)
)
Hi @marczh
Please try this
With(
{_Item: 'Reporting Vermietung'};
SortByColumns(
Search(
If(
DropdownStatus.Selected.Result = "Alle" || DropdownPFM.Selected.Result = "Alle";
_Item;
Filter(
_Item;
'Status Text' = DropdownStatus.Selected.Result || PFM = DropdownPFM.Selected.Result
)
);
TextSearchBox1_1.Text;
"Objekt";
"PFM";
"Status_x0020_Text";
"Mieter"
);
SortColumn;
If(
SortDescending1;
Descending;
Ascending
)
)
)
When I select the first dropdown nothing happens when I select the second drop down it is filtering something in a wrong weird way. The search box is working finde. Eventough there is no error message from the code.
I think the problem is maybe in the Or Statement for the two filters?
with this code
With(
{_Item: 'Reporting Vermietung'};
SortByColumns(
Search(
If(
DropdownStatus.Selected.Result <> "Alle" Or DropdownPFM.Selected.Result <> "Alle";
Filter(
_Item;
'Status Text' = DropdownStatus.Selected.Result Or PFM = DropdownPFM.Selected.Result
);
_Item
);
TextSearchBox1_1.Text;
"Objekt";
"PFM";
"Status_x0020_Text";
"Mieter"
);
SortColumn;
If(
SortDescending1;
Descending;
Ascending
)
)
)
The Dropdowns are working but just if One of them is set to "Alle"
Is there a way they work both dynamically together despite the value of the other?
Hi @marczh
Both Dropdown selection is optional now.
With(
{_Item: 'Reporting Vermietung'};
SortByColumns(
Search(
Filter(
_Item,
(DropdownStatus.Selected.Result = "Alle" || 'Status Text' = DropdownStatus.Selected.Result) && (DropdownPFM.Selected.Result = "Alle" || PFM = DropdownPFM.Selected.Result)
);
TextSearchBox1_1.Text;
"Objekt"
"PFM";
"Status_x0020_Text";
"Mieter"
);
SortColumn;
If(
SortDescending1;
Descending;
Ascending
)
)
)
@StalinPonnusamy Thank you very much, this works out just fine! Even if don't understand a 100% of the syntax 🙂
User | Count |
---|---|
162 | |
84 | |
70 | |
64 | |
62 |
User | Count |
---|---|
208 | |
147 | |
95 | |
84 | |
68 |