web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Bot can't get items fr...
Copilot Studio
Unanswered

Bot can't get items from sharepoint list with matching name

(0) ShareShare
ReportReport
Posted on by 145

I try to create bot that get Item form sharepoint list but can't Return value to Power virtual agents

Alicekings_1-1637120510684.png

 

Then I try another solution by try to keep output in the Variable initialization it fix the error but the bot still return null value 
 

Alicekings_2-1637120537613.png

 

Output 

Alicekings_3-1637120647025.png

 


Thank you for any advice 

 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Inside your loop you should be using the Append to String Variable action, not the set variable action.  The set action will overwrite the results from each previous loop so you will only get the last value in the column.  What you probably want looks more like this.  In this flow I built a table using markup to display three columns. Then returned the string variable to the Bot for display.

    image.png

  • Alicekings Profile Picture
    145 on at

    @Pstork1  Thanks for your comprehensive reply your solution fix the loop action, but unfortunate it look like my flow didn't get value from Get items part 

    History run 

    Alicekings_0-1637125022875.png

    My sharepoint list Name colume type is person  and VacationLeave type is Number the name that get from the bot is correct but it still return null value 

    output detail 

    Alicekings_1-1637125168171.png







  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Is Name a People column in SharePoint or a single line of text?  If its a single line of text you won't be able to use that as part of the query since its a complex object not text.  You'll have to do the get items and then use a filter array to filter the result.  Without knowing what your data looks like its hard to tell what is not working.  But I suspect its the query you are using in Get items.

  • Alicekings Profile Picture
    145 on at

    @Pstork1  Thanks for your reply 

    I alredy fix it with you help on the first solution and the problem on get items return null value it look like on Filter Query can't match Person or Group type so my solution is Copy the name and enter in the Title (Single line of text)
    and in the Filter Query Instead of use Name columns I use Title eq (Value that my bot get) and it work

    Alicekings_0-1637296335722.png

     

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You can use the Person or Group column for the filter.  But since those are complex objects you don't use the column name to match.  There should be some dynamic content for Name Display Name or something like that.  That is the property in the people group column that is the name of the person.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard