How to create a loop in Power Automate

Anonymous
2023-08-06T20:04:06+00:00

Hello!

I need some help to create a loop in Power Automate, i need to loop that flow in the red circle every time it shows an image. How do i do it?

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dio Xavier 271.1K Reputation points Volunteer Moderator
    2023-08-06T20:33:34+00:00

    Welcome to Microsoft Community

    To create a loop in PA (Processing Language), you can use a "while" or "for" loop to repeat a specific portion of your code. In your case, you want to loop the flow in the red circle every time it shows an image. To help you with a more specific answer, I need to know a bit more about your code and how you are handling the image display and flow within the red circle. However, I can provide you with a general outline of how you can create a loop for the flow:

    void setup() { // Initialize your canvas and other setup code here}void draw() { // Draw your background and other elements here // Check if it's time to show an image in the red circle if (timeToDisplayImage()) { // Show the image in the red circle displayImage(); // Implement the flow within the red circle // ... } // Continue with the rest of your drawing code // ...}// Function to check if it's time to display an imageboolean timeToDisplayImage() { // Implement the logic to determine when to display an image // For example, you could use the frameCount to display an image every N frames. // Replace N with your desired number of frames. int N = 60; // Display an image every 60 frames return frameCount % N == 0;}// Function to display an image in the red circlevoid displayImage() { // Implement the code to show an image within the red circle // ...} <br> ---

    Please note that the code above is a general outline, and you will need to adapt it to your specific implementation. The timeToDisplayImage() function should return true when it's time to display an image, and the displayImage() function should handle how the image is shown within the red circle.

    If you provide more details about your code, I can assist you further in incorporating the loop into your specific scenario.

    0 comments No comments
  2. Anonymous
    2023-08-07T00:26:02+00:00

    Dear William Marongio,

    Good day! Thank you for posting to Microsoft Community. We are happy to help you.

    As per your description, it seems that you are create a loop in Power Automate.

    If the understanding above is right, apart from what Dio Xavier has suggested, please check if below official articles can help.

    For your reference: Using loops - Power Automate | Microsoft Learn

    Automate repetitive tasks using loops in Power Automate for desktop - Training | Microsoft Learn

    If still not, considering that we mainly focus on general and build-in queries in M365 and Office, for Power Automate related queries, we have a dedicated channel Microsoft Power Automate Community, for you to be assisted properly, we sincerely recommend you go to that community and post a new thread. Members and engineers over there are proficient in the knowledge of flow customization queries. They will focus on the specific situation on your side and provide specific suggestions for you.

    The reason we ask you to post a new thread is that in Microsoft Community we have limited resources and very little knowledge about Power Automate and in Microsoft Power Automate Community, you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction.

    Thanks for your understanding and cooperation! We hope you stay safe and healthy always.

    Sincerely,

    Rhoda | Microsoft Community Moderator

    0 comments No comments