cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SpaceNudeln
Frequent Visitor

How to get specific value from Sharepoint list using Power Automate in PVA

Hello! Im kinda newbee to all of things like Power Automate and im sorry if this question was discussed here before, i ve tried to find it in topics history but it didnt work out.

I would like to create a chat bot that would serve as help in the HR department so that employees can receive information through it (from weather forecast for example to receiving documents). And now I'm stuck on the number of vacation days for employees. I want to make it so that when asked, the employee X will write "How many vacation days do I have?" and received a response, for example: The number of your vacation days, employee X, is 65.

 

I created a Sharepoint list in which I want to store this information and I need the bot to read, for example, the DaysLeft2021 column to the name of the person who asked this information (and not someone else). Unfortunately, I cannot share the picture right here, but if possible, I have attached a link to the photo on Imgur (https://imgur.com/pm822ED), I hope this is not against the rules. I reviewed a bunch of different videos, especially this one (https://youtu.be/v_eE2ig4mTk?t=848 timecode included), where there is a moment of creating such a bot, but unfortunately, after I did 1 in 1, I got an error.

In addition, the person in the video said that there are better ways to do this operation. I hope I have explained my problem correctly. 🙂

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

So... is your expression providing the output you were expecting? I mean

body('Filter_array')[0]['DaysLeft2021']

 

IF not, I would suggest two troubleshooting approaches:

First, to add a second Compose action block just after your 'Filter array' and assign it the following WDL expression:

length(body('Filter_array'))

Second, to add a third Compose action block, assign it the following expression

body('Filter_array')[0]

 

By means of the second 'compose' you can verify if you are getting at least one matching item from your sharepoint list, and if so, by means of the third 'Compose' you can verify if the first matching item is the one you are looking for; and also if the SP internal column name for 'DaysLeft2021' is exactly the same

Please give a try, reexecute your flow and share your insights

Thanx!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

5 REPLIES 5
efialttes
Super User III
Super User III

Hi!

Can you share a screenshot from your current flow design?

Thamx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi! Thanks for the reply 🙂
Yea sure. Here it is: https://imgur.com/e8SFjC0

So...somehow my flow did work but it counts not DaysLeft2021 - 68 in my case (second column) but DaysUsed2021 - 18 (third column) - check Imgur link in my first post for Sharepoint List. I dont know why but this time it works and in a bit strange way. 

My Input in Compose part is 

 body('Filter_array')[0]['DaysLeft2021']

If you may please explain how this Expression with "body" generall works i would be very happy, because im a person from business side and not from IT hehe 🙂

 

So... is your expression providing the output you were expecting? I mean

body('Filter_array')[0]['DaysLeft2021']

 

IF not, I would suggest two troubleshooting approaches:

First, to add a second Compose action block just after your 'Filter array' and assign it the following WDL expression:

length(body('Filter_array'))

Second, to add a third Compose action block, assign it the following expression

body('Filter_array')[0]

 

By means of the second 'compose' you can verify if you are getting at least one matching item from your sharepoint list, and if so, by means of the third 'Compose' you can verify if the first matching item is the one you are looking for; and also if the SP internal column name for 'DaysLeft2021' is exactly the same

Please give a try, reexecute your flow and share your insights

Thanx!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Thanks for a fast response! I will try to do what u suggested now. 

body(
'Filter_array')[0]['DaysLeft2021'is working now, but it shows me DaysUsed2021 (18) and i wanted to get DaysLeft2021 (65). Dont know why this happend 😅

Okay, i guess i figured it out why it counts third column. Appareantly, at the beginning of site creation i named second column as DaysTotal2021, third column as DaysLeft2021 and THEN i renamed second column to DaysLeft2021 and third one to DaysUsed2021... Why this happening? In my sharepoint site it says clearly how those columns are named. Screenshot of this: https://imgur.com/OP9kK5S 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,142)