I am trying to get my PVA to filter back results using one column on a SharePoint list that is not the main title -one of the other additional columns. For example, if the user types in "Cat" and I save that as the PVA variable and then initialise variable for a table list, I then want the PVA to return rows with the term "Cat" in my animal column using the "Get Items" from Sharepoint.
I have heard about using the Filter Query but have no idea, which function to use to filter lists by individual columns? Does anyone know how to do this?
Thank you.
Thanks and I hope that you had a good Easter BH. I managed to get my flow working, by just adapting my table headings in my initial variable settings. In doing that my Chatbot was able to filter properly 😀. I have also just discovered adaptive cards and they are very useful too.
The parse JSON is just a schema built from the output of the get items. Its there because otherwise you won't see individual fields after doing the filter array. For the Value just use the JSON that you get for Status but append ?['Value'] to the end to get the Value of the Status, not the object.
Thanks for your example. I think, I'm just about there but what did you put into your Parse Json and also I can't see on mine the variable "Value", which you have from your second apply to control. When I run mine, all I am getting in return is the initalise variable headings.
Here's a simplistic example using a choice column called animal type
Thanks Pstork1. I have just been trying to use that and my PVA usually just displays every row in that column. I have tried using compose after filter array, but am not sure if that is correct. Do you have tips for using filter array
OData may or may not work depending on what type of column it is. If its a choice column OData can be a problem. But as long as your SharePoint list isn't a huge list (over 5,000) items you should be able to get the full list and use a filter array to filter out the rows you don't want. That is much easier than an OData query.
Thank you Pstork -yes that sounds exactly what I am trying to do and sorry for not being clear, I am using a power automate flow and get items but am not sure what my OData query should look like? Do you know of a Standard formula I could try?
I'm not sure what you mean by a filter query. But I would normally do this using a Power Automate flow called as an action in the bot. You can easily pass the term variable to the flow as input. the flow can then use that to get items from SharePoint and filter the list either using an OData query in the get items or a filter array action. The results can then be returned as a formatted table for display in the bot using the PVA markdown language.