cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alicekings
Helper III
Helper III

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

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 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

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



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
Pstork1
Dual Super User III
Dual Super User III

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



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

@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
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@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
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Planning-build-bot-2-5-20-768x460.png

New Year’s Resolution - Build Conversational Bots!

Access all of the Power Virtual Agents learning resources and join the January learning challenge.

Users online (2,510)