cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ALP1
Super User
Super User

Respond to powerautomate + how to get all the records from the previous action

Hi, i want to show all the read only user for a flow inside my powerapps. 

So in my flow i added the action 'list flow run-only user" the office connector to obtain the display name of the user

 

ALP1_0-1637066415860.png

but when i want to save it i have this error message Respond_to_a_PowerApp_or_flow' has type 'Response' that could not be nested under an action of type 'foreach'.'.

 

it seems that this is not possible. 

Do you have an idea how to do that ? 

 

Thank for your ideas 

1 ACCEPTED SOLUTION

Accepted Solutions
serbayk
Frequent Visitor

Hi @ALP1 ,

You can only use a single item in the respond action. You could append all the output results from the loop, and/or joining them using 'Join' action with a certain separator, then building a split logic inside from Apps.

Inside flow; Please, Create a array variable and append all the results. Then use this array in the respond action.

 

You could build such a logic in the PowerApps;

On select properties of the button

Set(var, Split(FlowNameHere.Run().RespondOutputNameHere,"SplitterHere"));

ForAll(var, Collect(RandomCollectionNameHere, { ObjectID: Result } ) )

 

Items properties of the visual element (gallery or data table etc)

RandomCollectionNameHere

 

 

Regards,

Serbay

View solution in original post

3 REPLIES 3
serbayk
Frequent Visitor

Hi @ALP1 ,

You can only use a single item in the respond action. You could append all the output results from the loop, and/or joining them using 'Join' action with a certain separator, then building a split logic inside from Apps.

Inside flow; Please, Create a array variable and append all the results. Then use this array in the respond action.

 

You could build such a logic in the PowerApps;

On select properties of the button

Set(var, Split(FlowNameHere.Run().RespondOutputNameHere,"SplitterHere"));

ForAll(var, Collect(RandomCollectionNameHere, { ObjectID: Result } ) )

 

Items properties of the visual element (gallery or data table etc)

RandomCollectionNameHere

 

 

Regards,

Serbay

ALP1
Super User
Super User

Wow. It works like a charm.

 

I create a new variable 

ALP1_0-1637084362706.png

 

and these actions

ALP1_1-1637084426709.png

I collect results 

ALP1_3-1637084537051.png

and the result into the apps

 

ALP1_5-1637084685672.png

 

No need to use split function for now cause we are only 2 person to use this admin screen.

The idea is to add dynamically people in a flow as run only user...from the apps. No need to open powerautomate for mgmt now ^^ 

 

Thank you so much

serbayk
Frequent Visitor

Hi @ALP1 ,

I'm glad your issue has been resolved.

Cheers! 

 

Regards,

Serbay

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,603)