Hi All,
I m in the middle of building an app and want to filter a collection as follows.
1. selectedRequestor,Permission.Value = "Add"
AND
2. Status.Value Rjected OR Cancelled
AND
3. WFType.Value= XYZ
I have used the following condition but ii won't filter out Cancelled records from the selectedRequestor collection. Can someone please help me with this? The selectedRequestor collection ends up with records the Status. Value = Cancelled.
ClearCollect(selectedRequestor1,Filter(selectedRequestor,Permission.Value = "Add" && ( Status.Value <>"Rejected" || Status.Value <>"Cancelled")&& WFType.Value ="XYZ"))
Thank you.
Solved! Go to Solution.
Hi @NewNW ,
Just a logic adjustment - you need And &&, not Or || when you use Does not equals <>
ClearCollect(
selectedRequestor1,
Filter(
selectedRequestor,
Permission.Value = "Add" &&
Status.Value <> "Rejected" &&
Status.Value <> "Cancelled" &&
WFType.Value ="XYZ"
)
)
although I am also wondering why you have .Value on Text filters.
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
You do not need quotes around the field name
LookUp(
bd_Solicitud_QR,
scandata.Text in Clave
)
Hi @NewNW ,
Just a logic adjustment - you need And &&, not Or || when you use Does not equals <>
ClearCollect(
selectedRequestor1,
Filter(
selectedRequestor,
Permission.Value = "Add" &&
Status.Value <> "Rejected" &&
Status.Value <> "Cancelled" &&
WFType.Value ="XYZ"
)
)
although I am also wondering why you have .Value on Text filters.
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
Can any of you please tell me what is wrong with this comparison?
Filter(bd_Solicitud_QR, Clave = "PH1B-5-221110")
Clave is a text field in the data source bd_Solicitud_QR. This cannot be simpler and yet I get an incompatibility error: "Incompatible types for comparison"
@NewNW ,
You have it as the Item of a Form which needs a Record, not a Table. Use LookUp instead of Filter.
Thank you. The error went away with the formula:
LookUp(bd_Solicitud_QR, scandata.Text in "Clave" )
However, the Form displays no record when I enter a valid Clave value in my input field.
Is it because I'm not using the result part of the Lookup function? Sorry, but this documentation is not helpful at all:
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-filter-lookup
When the input field is empty the Form displays the first record:
You do not need quotes around the field name
LookUp(
bd_Solicitud_QR,
scandata.Text in Clave
)