Skip to main content

Notifications

Calling Actions from Copilot Studio
Answered

Get items filter query Copilot Studio

Posted on by 12

Hi, i am trying to create a Topic that collects User Input and finds a specific item in a Sharepoint list with the get items Connector action. I cannot wrap my head around how to build the filter Query for this. 

image.png
Normally i would use the query  InventoryNr eq and the variable from the User Input.

 

How can i achive this here. The system wont let me input another line of text or something... image.png

Thanks for the help. BR Niklas

  • niklasjegg Profile Picture
    niklasjegg 12 on at
    Re: Get items filter query Copilot Studio

    Hi @Pstork1  oh my this is a task. I don´t get it why someone decides to make it this complicated. I am sorry i missed the concatenate part there 🙂 I am fine with the connector action haha. 

     

    Also working now thanks a lot!

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 1,997 on at
    Re: Get items filter query Copilot Studio

    Trying again, I still couldn't get it to work as a plugin, but using the connector action it worked the way I expected it to. From what I've been told the Plugin is really designed more for direct APIs rather than using the pre-built connectors.  But using the variable I created in the previous screenshots my OData query on the Title field worked.

    image.png

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 1,997 on at
    Re: Get items filter query Copilot Studio

    I'm having issues getting it to work also, but I am getting what looks to be a valid query string.  As I mentioned you need to use concatenate and add punctuation.  Like this.

    image.png

    This is what the query output string looks like

    image.png

  • niklasjegg Profile Picture
    niklasjegg 12 on at
    Re: Get items filter query Copilot Studio

    Hi @Pstork1  im sorry yes i also tried this.

    niklasjegg_0-1706793053541.png

     

    niklasjegg_1-1706793060366.png

    But sad enough still getting a generic error.

    niklasjegg_2-1706793090292.png

     

  • Pstork1 Profile Picture
    Pstork1 1,997 on at
    Re: Get items filter query Copilot Studio

    That looks correct except for the missing quotes around Topic.ItemName, In an OData query for a string you need to surround the value with single or double quotes. You may also need to use a Power FX concatenate to build the string instead of just typing it in when using a variable.

  • niklasjegg Profile Picture
    niklasjegg 12 on at
    Re: Get items filter query Copilot Studio

    So i have tested this again and came to a conclusion:

     

    Copilot Studio is doing this wrong: 

    niklasjegg_1-1706768327208.png

    The Set Variable action does not work! If i output the variable in the same manner {Topic.ItemName} as a text message it works fine. 

    niklasjegg_2-1706768440690.png

    If i manually write my query in the Get Items action it also works so my SPO Column is also correct...

  • niklasjegg Profile Picture
    niklasjegg 12 on at
    Re: Get items filter query Copilot Studio

    Hi @Pstork1 ,

     

    okay so would this look something like this? 

    niklasjegg_0-1706765224091.png

    im still getting an Error from the get items action.

  • Pstork1 Profile Picture
    Pstork1 1,997 on at
    Re: Get items filter query Copilot Studio

    You still use the same kind of OData query. If you don't want the user to actually type the query in using that format you would need to use the set variable functionality to build out the appropriate query.  Then use that variable as the query.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,997

#3
Expiscornovus Profile Picture

Expiscornovus 1,708

Leaderboard

Featured topics