Hi,
I have a combo box "Stage" that acts as a filter for the gallery. I am using Sharepoint list and "Stage" is a choice field with data "New, Closed, Cancelled". When the page is loaded, I hope to display all the items with "Stage = New". I tried to change the defaultselecteditem = ["New"] but it don't seems working to filter the gallery list.
Does anyone has any advise on this? THanks in advance.
Solved! Go to Solution.
Ive seen my supplied code work before but I'm not surprised that it didn't work.
@Krishna92 code should've worked for you, can you please supply the exact code you used with that method?
Hi @sbgoh ,
Please refer to the following steps:ac
Set the Items property of Gallery:
Filter(Listname,Stage.Value=ComboBox1.Selected.Value)
Set the Items property of Combobox:
Choices(ListName.Stage)
Set the DefaultSelectedItems property:
LookUp(Choices(ListName.Stage), Value="New")
Then it should work as you expected.
Sik
Try setting up the filter formula on the items property of the Gallery.
the formula has to be Filter(Listname,Columnname = Combobox.selected.value)
Please refer to the document for more information related to filter function.
If the information helps you, please consider giving a thumbs up and mark solution as resolved
I used this method "Filter(Listname,ColumnName = Combobox.selected.value)" but the gallery don't see to read the DefaultSelectedItems value that I set in the combo box.
I also tried to set the DefaultSelectedItems={Stage: "New"} to the following but nothing is filtered.
Ive seen my supplied code work before but I'm not surprised that it didn't work.
@Krishna92 code should've worked for you, can you please supply the exact code you used with that method?
Hi @sbgoh ,
Please refer to the following steps:ac
Set the Items property of Gallery:
Filter(Listname,Stage.Value=ComboBox1.Selected.Value)
Set the Items property of Combobox:
Choices(ListName.Stage)
Set the DefaultSelectedItems property:
LookUp(Choices(ListName.Stage), Value="New")
Then it should work as you expected.
Sik
It is working now. Thanks!
User | Count |
---|---|
255 | |
106 | |
85 | |
51 | |
43 |