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

Use Expression on Power Automate inside PVA (on teams)

I´m workin in a bot using the license for teams.

So I´m on PVA inside the Teams.

 

I need to call and action and in this action i need to use a expression to get a length of a collection. Is it possible?

 

In Power Automate on Web I know how to do that, but on Teams seems not to be possible.

1 ACCEPTED SOLUTION

Accepted Solutions
StevenA
Frequent Visitor

Edit:  I found out I could do it.  In Teams, my screen was zoomed in too far so I couldn't see the expressions.  As a side note, my colleague was able to do expressions within Teams, so I assume it is related to screen resolution.  I popped the Chatbot out into a browser window by doing Ctrl + click on the Chatbots tab.  From there, I was able to zoom out enough to see expressions.

StevenA_1-1626875231183.png

 

StevenA_0-1626875150155.png

 

@GustavoDuarte  I'm not seeing a way to access expressions, either.  

 

Can you tell me a bit more about your use case?  Are you making an API call and getting an array of items back?  Here are a couple options to consider.

 

1.  Sometimes, the API will return the number of items in a property that you can access directly.  Can you look at your collection to see if such a property exists?

2.  As a somewhat annoying but effective workaround, you could put your array inside an apply to each loop, increment a variable for each loop, then return the variable to PVA.  

 

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

One of the things you can do in PVA for Teams is to call an Action (Power Automate flow).  You can pass parameters into the flow and get a return value.  So you need to call a flow (make sure you create it from PVA so its in the right environment).  Then have the flow calculate the length of the collection and return that value.



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

Edit:  I found out I could do it.  In Teams, my screen was zoomed in too far so I couldn't see the expressions.  As a side note, my colleague was able to do expressions within Teams, so I assume it is related to screen resolution.  I popped the Chatbot out into a browser window by doing Ctrl + click on the Chatbots tab.  From there, I was able to zoom out enough to see expressions.

StevenA_1-1626875231183.png

 

StevenA_0-1626875150155.png

 

@GustavoDuarte  I'm not seeing a way to access expressions, either.  

 

Can you tell me a bit more about your use case?  Are you making an API call and getting an array of items back?  Here are a couple options to consider.

 

1.  Sometimes, the API will return the number of items in a property that you can access directly.  Can you look at your collection to see if such a property exists?

2.  As a somewhat annoying but effective workaround, you could put your array inside an apply to each loop, increment a variable for each loop, then return the variable to PVA.  

 

Cristofer_Humo
New Member

Thanks a lot for your comments. I closed the window where one tests the chatbot and allowed me to see the dynamic content menu.

Cristofer_Humo_0-1654124177611.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (2,061)