cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shannon_Marceau
Helper I
Helper I

Flow

Can somebody show me the correct syntax to use in a flow for IsEmpty? I have a condition that needs to check if a shaepoint list field is empty....if it is we do nothing...if its not we send an email

1 ACCEPTED SOLUTION

Accepted Solutions

This is what i ended up with that works great;

 

Sharepoint List: When a New Item Is created......

 

Condition:   @if(empty(triggerBody()?['Issues_x0020_for_x0020_Repair']),True,False)

 

 

If yes do nothing                     If no send email.

 

Thanks for the help, the last two replys got me there

View solution in original post

5 REPLIES 5
v-micsh-msft
Community Support
Community Support

Hi @Shannon_Marceau,

 

Would you like to check the empty of SharePoint list within a Microsoft Flow, or in PowerApps?

If only for Microsoft Flow, would you please share your Flow configuration?

I will share an example here.

1.We add the SharePoint->When an Item is created Trigger, then add a Compose Action, 

2. Under Compose Input, input the following to check whether Email field is empty:

"@if(empty(triggerBody()?['Email']),2,1)"

3. After Compose Action, add a switch, use Compose Output as the value

4. Case one value set to 1, case two set to 2, 

5.Under Case one with the Value set to 1, add the Send an Email action, save your flow

If the Email field is not empty, then Case one would be triggered, which will then trigger the Send Email Action.

You may take a look at the following thread as a reference:

Calculate variable by Compose

Additional reference:

Workflow Definition Language

 

If within PowerApps, formula should be:

If(IsBlank(lookup(list, formula to lookup the special value)),2,Office365.SendEmail("EmailAddress","Subject","Body"))

Which would need to add the Office 365 Outlook Connection first.

Formula reference:

IsBlank and IsEmpty functions in PowerApps

Please reply back if you need any further assistance.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply.....I think perhaps I was unclear.

I am creating a flow that is triggered by a new record being added in a sharepoint list called "Equipment Checklist"

 

The Sharepoint list has a column  called "Items for Repiar". If there is no data in this column the flow ends. If the "Items for Repair" column has data in it, I need to send an email. The drop down list in flow has "contains" "Greater Than" Equal to" etc......but no selection for "is empty" so I see you can go to advanced instead of just selecting one of the preprogramed selections, but i would need to know the syntax to check if the "Items for Repair" column is empty or not?

Hi @Shannon_Marceau,

 

What is the column type of the "Items for Repair" you mentioned here?

In addition, would it be convenient for you to share about which Flow trigger and the action that you have used?

If the trigger is SharePoint->When a new item is created, we could take use of the condition with the empty function directly, please copy and paste the following formula under the Advanced mode in Condition added after the trigger:

@empty(triggerBody()?['Items_x0020_for_x0020_Repair'])

See if it would work.

Please post back if you need any further assistance.

Regards

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is what i ended up with that works great;

 

Sharepoint List: When a New Item Is created......

 

Condition:   @if(empty(triggerBody()?['Issues_x0020_for_x0020_Repair']),True,False)

 

 

If yes do nothing                     If no send email.

 

Thanks for the help, the last two replys got me there

View solution in original post

Do you need to have underscores between each word? What does your actual SharePoint Column look like? 

 

For my SharePoint column, I have "Name of Third Party" and in my conditional, it is: @if(empty(triggerBody()?['Name of Third Party']),True,False) and it returns true, even when I test with something in the column when the list is created.

 

Help, please.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,683)