I'm having a hard time with the "filter array" step after retriving SharePoint items. Without the filter, all items are returned. But when I try to filter, it returns nothing. The output of the filter step is just an empty array []
I'm not sure what I'm doing wrong. My goal is to have a filter like this.
Items with a "Status" field equal to "Pending", and then any items where the user that initated the flow is in any of the fields "Assigned To", "RVP", or "TSM". My filter step looks like this:
@and(
equals(item()?['Status'], 'Pending'),
or(
equals(item()?['Assigned_x0020_To'], triggerOutputs()['headers']['x-ms-user-name-encoded']),
equals(item()?['RVP'],triggerOutputs()['headers']['x-ms-user-name-encoded']),
equals(item()?['TSM'], triggerOutputs()['headers']['x-ms-user-name-encoded'])
)
)
When this didn't work, I tried simply
@equals(item()?['Status'], 'Pending')
but that didn't work either. It always returns no items.
I've also tried defining it using the UI instead of advanced:

The field is named "Saved Status" but the true internal name of the field is just "Status". I also notice that the Flow UI lists both "Save Status" and "Save Status Value" as possible field choices for the left side of the filter step, but neither works. I definitely verified that there are items in the list with the Pending status.
My end goal is to have a button flow that lets a user receive an email with the list items relevant to them in the email body.