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

Help with Conditions, for an Event

Hello everyone, 

I've been trying to figure out what's going on with Conditions on my flow. I think I am misunderstanding something but I'm not sure what I'm missing. 


Basic idea: I want to restrict the number of submissions we have at my company. So when we get past say 10 people, we email the person to tell them they're on a waiting list. 

 

I've gotten past the turning an Array into an Object (or maybe it was the other way around.. either way I got it working). 

 

However, when I run the flow, it always says the flow is "true", even when it's not. 

Examples are linked below but the general gist: I put the outputs array > is greater or equal to > '[insert number]' 

 

Am I missing something? Does PA mark the Email as a word rather than a number? It's really confusing (and I'm on a deadline so any support would be great). 

3 REPLIES 3
Anil_g
Skilled Sharer
Skilled Sharer

@SicklyBird 

 

ideally for every item this is triggered ..so get response details will always get only single response details...so everytime it is less than 2..>So it always goes to yes side

 

if you need to know the responses count ...you might need to store the responses to a list or excel and then count the number of items 

 

cheers

 

cheers

@SicklyBird You can avoid needing to use the Add a Row action if you use the built-in feature in MS Forms that allows you to sync your responses to to a workbook. You can enable this option by clicking on the Responses tab of your form. 

 

Click the three dots then select Sync all responses to a new workbook option.

 

creativeopinion_1-1718556635413.png

 

Once you do that, you will see the workbook appear in the place of the Open in Excel option.

 

creativeopinion_0-1718556577856.png

 

Depending on the type of form you've created, the Excel file will be stored on your OneDrive or a SP site. I cover the two different types of MS Forms in this section of my YT Tutorial: How to Get Microsoft Form File Uploads Attached to an Email 📧

 

In this Microsoft Power Automate Tutorial I’m going to cover where file uploads from your Microsoft Forms are saved. I’ll also show you how attach the uploaded files to an email and how to dynamically name the files and customize the recipient of the email based on the selections made in your Microsoft Form. I will also cover how to handle responses that don’t include any file uploads.

 

I’m not going to cover how to get the values from your form since I've already covered that in a different tutorial.

IN THIS VIDEO:

‌ Two types of MS Forms

‌ Where Microsoft Personal (OneDrive) Form File Uploads are Saved

‌ Where Microsoft Group Form File Uploads are Saved

‌ How to Add a File Upload Question to an MS Form

‌ How to get a Microsoft Form ID

‌ How to get a Microsoft Form Response

‌ How to Get the Dynamic Content Microsoft Form File Upload Content

‌ How to handle Single and Multiple Microsoft Form File Uploads

‌ How to use a Scope action to Organize and Group Your Flow Actions

‌ How to Get the File Content from an MS Form File Upload

‌ How to Collect All Files Uploaded to a MS Form and Attach to an Email

‌ How to Handle MS Form Response When a File Isn’t Uploaded

‌ How to Create an Email Key

‌ How to Send an Email to a Specific Recipient Based on Form Selection

‌ How to Create a Dynamic Output Based on Form Selection

 

You can simplify your flow by using dynamic content — it could look something like this. 

creativeopinion_28-1718560062512.png

 

----

Manual Trigger

Start with a Manual trigger while you build and test your flow. You can replace it with the Automated trigger once you've confirmed your flow works and you are ready to go live.

 

However, I actually prefer to keep a manually triggered copy of my flow. This can help with troubleshooting if you run into issues later on, or if you want to make changes to your flow. It's also more efficient when building flows for MS Forms — instead of needing to leave Power Automate to submit a form each time you'd like to trigger your flow you can manually trigger your flow on a form that has already been submitted.

creativeopinion_20-1718559379919.png

 

Add a List Rows Present in a Table action. 

 

It's important to note that by default the number of rows returned from the List rows present in a table action is 256 rows. If you expect the number of rows to be greater than 256, you'll need to toggle on pagination and set a threshold.

creativeopinion_2-1718557191725.png

 

creativeopinion_3-1718557209698.png

 

Count Rows

Insert a Compose action. Add an Expression. Use the length() function.

creativeopinion_8-1718557646472.png

 

Select the Dynamic content tab and insert the body dynamic content from the Filter Array action into the length() function.

creativeopinion_5-1718557346621.png

 

Dynamically Compose the Email Content

Instead of using two Send an Email (V2) actions in your flow, you can use an expression to dynamically change the content of your email based on whether or not the number of rows in your Excel table is greater than or equal to your limit. In this case we'll use your example limit which is 10. 

 

Check to See if Number of Rows is greater or equal to the Limit

Add a Compose action to store the subject line of your email which you can then insert into the Send an Email (V2) action. I prefer to use Compose actions to run tests on expressions and verify the output. This speeds up the flow building process as you don't need to wait for an email to arrive in your inbox. 

 

Add an expression and insert the greaterOrEquals() function.

creativeopinion_9-1718557768696.png

 

To learn more about how to use expressions in your flow, refer to this YT Tutorial: 7 Functions You Need to Know | ️Expression Essentials: Part 1

 

In this section, I'll cover how to get dynamic content with an expression when the dynamic content you need isn't listed in the dynamic content menu.

 

In the full tutorial I cover 7 functions you need to know when getting started with expressions.

1️⃣ empty()

2️⃣ coalesce()

3️⃣ equals()

4️⃣ if()

5️⃣ concat()

6️⃣ length()

7️⃣ split()

 

I cover how to use these functions in expressions and I’ll also cover common mistakes when it comes to writing expressions and show you a few tips and tricks along the way.

 

As a beginner or even an intermediate flow builder—expressions can seem a bit complex at first, I’m going to try to simplify it for you. If you want to level up your flows by writing expressions—keep watching!

 

IN THIS VIDEO:

 What is an Expression?

 What is a Function?

 What Does Wrapping a Function Mean?

 How Do I Insert an Expression?

 How to Use a Compose action

 How to Navigate the Expression Builder with Arrow Keys

 How to use the Expression Tooltip

 Common Mistakes When Writing Expressions

 How to differentiate a null from an empty string

 How to Get Dynamic Content When it’s Not Listed

 How to Use a Get Item Action to Verify Dynamic Content Output

 How to Convert Strings to Lower Case

 How to Troubleshoot the if() Function

 

---

The greaterOrEquals() function takes two parameters:

greaterOrEquals([value: string|float|integer], [compare to: string|float|integer]

Click on the Dynamic Content tab and insert the output from the Compose action above. 

creativeopinion_10-1718558066318.png

Add a comma and enter the value to compare it to. Important: You must be comparing the same type of values to each other. 

creativeopinion_11-1718558271010.png

 

Run a test. The greaterOrEquals() function will return a true or false value. Review the output of the Compose action. In my example, the number of rows in my table is 26. 

creativeopinion_12-1718558329881.png

Dynamically Output Subject Line

Next, you'll need to use the if() function to dynamically output a subject line. The if() function takes three parameters:

if([boolean value aka true/false], [value if true], [value if false])

Click on the expression to edit it. We're going to wrap the expression in the if() function. Type in if with an opening parenthesis.

creativeopinion_13-1718558819401.png

Press the down arrow key to go to the end of the expression. Add a comma. Tip: Pay attention to the tooltip as it'll bold the text of the current parameter you are defining.

creativeopinion_16-1718558903750.png

If the number of rows in the spreadsheet is greater or equal to the limit, you want to output a subject line that notifies the submitter they are on the waitlist. Type in whatever subject line that is between single quotes. 

creativeopinion_17-1718559003023.png

Add another comma and type in the subject line you want to output if the value is false (aka the number of rows in the spreadsheet is greater than or equal to the limit). Make sure you add a closing parenthesisImportant: Whenever editing your expressions make sure you press update to save your changes.

creativeopinion_18-1718559134402.png

Run a test.

creativeopinion_19-1718559197971.png

 

Repeat this step for the email body. In my example I'm using another Compose action to compose the email body. You could omit this Compose action and simply insert the body content directly in the Send an Email V2 action.

creativeopinion_21-1718559468054.png

 

Send an Email (V2)

Add a Send an email (V2) action. When building and troubleshooting a flow that includes an action that sends an email or teams message, I always insert my email address in the recipient field until I can confirm the flow works.

 

I like to put a line of text in the body of the email or message that outputs the actual recipient of the email/notification.

 

I've inserted the output of the Compose actions that have the email subject line and body into the Send an Email (V2) action.

 

creativeopinion_22-1718559587372.png

Run a test. Review the email.

creativeopinion_23-1718559744975.png

For testing purposes, I'll adjust the limit to 30 and run another test. 

creativeopinion_24-1718559796696.png

 

Because my row count is 26—the subject line/body of the email indicates to the user they've been signed up.

creativeopinion_25-1718559868735.png

 

Replace your Manual Trigger

I'd recommend creating a copy of your flow (keeping a manual copy of your flow for testing/troubleshooting purposes). Replace the Manual Trigger with the When a new response is submitted trigger.

 

Insert the Response Id dynamic content into the Response ID field. 

creativeopinion_26-1718559990309.png

 

Insert the Responders' email dynamic content into the recipient field of the Send an Email (V2) action. 

creativeopinion_27-1718560016338.png

Run another test.

 

Hope this helps!

If I helped you solve your problem—please mark my post as a solution .
Consider giving me a 👍 if you liked my response!

👉 Level up your Power Automate skills by checking out my tutorials on YouTube
👉 Tips and Tricks on TikTok and Instagram

 

 

Thank you for the details, this helped me somewhat which I really appreciate. 

This issue is, I want the condition to work because I want to send a longer email with details if they are signed up. It means having to send a different email at a later date. 

This flow worked and is really helpful so thank you. But for some reason the condition is not working for me. 

Thanks again

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,007)