Hey guys,
I would like to filter my gallery with 2 dropdowns & 1 textinput:
Dropdown 1: Items: "Waiting for approval", "Approved". The formula to filter the gallery only with this dropdown is: "If(Dropdown1.Selected.Value="Waiting for approval";Filter(colrequests;And('Approval status 1'="Waiting for approval";'Approval status 2'="Approved"));Filter(colrequests;Or('Approval status 1'="Rejected";'Approval status 1="Approved")))
Dropdown 2: Items are from a Distinct formula on the Client Sharepoint List. The formula to filter the gallery only with this dropdown is: Filter(colrequests;Client=Dropdown2.Selected.Value).
TextInput 1: Default is blank. If i type the request number hree the formula must be Filter(colrequests;StartsWith(Title;TextInput1.Text)
How can I merge them?
Solved! Go to Solution.
Hi @Sesese ,
You just need to add that one the same way
With(
{
wApproved:
Dropdown1.Selected.Value = "Waiting for approval"
},
Filter(
colrequests;
(
(
wApproved &&
'Approval status 1' = Dropdown1.Selected.Value &&
'Approval status 2' = "Approved"
) ||
(
!wApproved &&
(
'Approval status 1'="Rejected" ||
'Approval status 1="Approved"
)
)
) &&
(
Len(TextInput1.Text) = 0 ||
StartsWith(
Title;
TextInput1.Text
) &&
(
Len(Dropdown2.Selected.Value) = 0 ||
Client = Dropdown2.Selected.Value
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Sesese ,
Try this format - a lot of bracketing required to separate and/or
With(
{
wApproved:
Dropdown1.Selected.Value = "Waiting for approval"
},
Filter(
colrequests;
(
(
wApproved &&
'Approval status 1' = Dropdown1.Selected.Value &&
'Approval status 2' = "Approved"
) ||
(
!wApproved &&
(
'Approval status 1'="Rejected" ||
'Approval status 1="Approved"
)
)
) &&
(
Len(TextInput1.Text) = 0 ||
StartsWith(
Title;
TextInput1.Text
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz,
thanks for your answer.
I think in this formula I only filter the gallery according to Dropdown 1 and Textinput1, Dropdown 2 seems missing
Hi @Sesese ,
You just need to add that one the same way
With(
{
wApproved:
Dropdown1.Selected.Value = "Waiting for approval"
},
Filter(
colrequests;
(
(
wApproved &&
'Approval status 1' = Dropdown1.Selected.Value &&
'Approval status 2' = "Approved"
) ||
(
!wApproved &&
(
'Approval status 1'="Rejected" ||
'Approval status 1="Approved"
)
)
) &&
(
Len(TextInput1.Text) = 0 ||
StartsWith(
Title;
TextInput1.Text
) &&
(
Len(Dropdown2.Selected.Value) = 0 ||
Client = Dropdown2.Selected.Value
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Sesese ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
User | Count |
---|---|
252 | |
107 | |
89 | |
51 | |
44 |