Hi Everyone,
I had tried to use reset(gallery),Reset(dropdown) to reset the galllery and dropdown to default .On clicking the button,dropdown is getting reset to default "ALL" which I have set but records disappear in gallery.
Dropdown used:
Onchange: If(Dropdown.SelectedText.Value = "ALL",Set(sortAll,false),Set(sortAll,true))
Items: ["ALL","New","Received"]
Default: "ALL"
What changes I have to do, to get all data records when I click reset button.
Hi @jasirqadri123 ,
To be clear, Galleries cannot be "reset" but items will refreshing every time the Items property getting changed, e.g. the result of a filter criteria changes.
So, on your end, if you would like to display all items in the Gallery when Dropdown selected value is "ALL", please try below approach:
1. Dropdown:
Items: ["ALL","New","Received"]
Default: "ALL"
2. Gallery:
Items:
Filter(YourDataSource, If(Dropdown.Selected.Value = "ALL", true, Column.Value = Dropdown.Selected.Value))
3. Reset button:
Reset(Dropdown)
Hope this helps.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
All is already working , I need to get ALL by default when I log in the app.
Hi @jasirqadri123 ,
My formula in the previous post should work for the All by default when opening the App. Have you tied it and how is it going now?
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
SortByColumns(If(sortAll,Filter(RepairOrderTables,Status = Dropdown.Selected.Value && Site = varsite.Site && (If(techAll,Technician = Dropdown1.SelectedText.Value,Site = varsite.Site))),Filter(RepairOrderTables,Site = varsite.Site && (If(techAll,Technician = Dropdown1.SelectedText.Value,Site = varsite.Site,If(!IsBlank(DatePickerStart.SelectedDate) && DatePickerStart.SelectedDate <= DatePicker.SelectedDate,OrderDate <= DatePicker.SelectedDate && OrderDate >= DatePickerStart.SelectedDate,OrderDate <= DatePicker.SelectedDate))))),"OrderDate",If(SortDescending1,Ascending,Descending),"OrderId",Descending)
This is formula on my gallery where i have four dropdowns .I need by default 'ALL' to show in Dropdown
Dropdown settings for given :
Dropdown used:
Onchange: If(Dropdown1.SelectedText.Value = "ALL",Set(techAll,false),Set(techAll,true))
Items: Tech
Onselect: ClearCollect(Tech,Distinct(RepairOrderTables_1,Technician));Collect(Tech,{Result:"ALL"});
Default: "All"
Hi @jasirqadri123 ,
The logic for the Items of Gallery is too complicated. Please try and put the tech condition on the top level:
With(
{techSelected: Filter(RepairOrderTables,If(Dropdown1.Selected.Value = "ALL", true, Technician = Dropdown1.Selected.Value))},
SortByColumns(
Filter(
techSelected,Status = Dropdown.Selected.Value && Site = varsite.Site &&
If(
!IsBlank(DatePickerStart.SelectedDate) && DatePickerStart.SelectedDate <= DatePicker.SelectedDate,
OrderDate <= DatePicker.SelectedDate && OrderDate>= DatePickerStart.SelectedDate,
OrderDate <= DatePicker.SelectedDate
)
),
"OrderDate",
If(SortDescending1,Ascending,Descending),
"OrderId",
Descending
)
)
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
I cannot change my original formula as it is already filtering and giving the dropdown values .only missing thing is ALL is not displayed in dropdown when I log in app but all records are shown.
Hi @jasirqadri123 ,
Showing ALL items should be one of the conditions that filtering in a Gallery. You can add another Gallery beside the previous one, copy and paste my formula to its Items property then adjust to make it work, and check if the formula could help you to achieve your goal.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |