Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Unanswered

How to get PVA to filter column from one SharePoint Column list

(0) ShareShare
ReportReport
Posted on by 58

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. 

Categories:
  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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. 

  • Pstork1 Profile Picture
    Pstork1 64,909 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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.

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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. 

  • Pstork1 Profile Picture
    Pstork1 64,909 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    Here's a simplistic example using a choice column called animal type

    image.png

    image.png

    image.png

    image.png

     

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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

     

  • Pstork1 Profile Picture
    Pstork1 64,909 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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.

  • Alexa2022 Profile Picture
    Alexa2022 58 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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? 

     

  • Pstork1 Profile Picture
    Pstork1 64,909 on at
    Re: How to get PVA to filter column from one SharePoint Column list

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics