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

IF Null user input help

Hi All, 

 

I have a flow connected to a button in SharePoint. When the user clicks it they are prompted to enter links. The fields are not mandatory but if they do not populate the fields, the flow fails. I want to write an if statement in the create item step to avoid this. 

 

Can anyone help with this?

 

PowerBI87_0-1595255277179.png

PowerBI87_1-1595255332015.png

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @PowerBI87 

 

You can check out this post as well: https://www.bythedevs.com/post/how-to-pass-a-null-value-as-an-input-while-using-a-manual-trigger-in-...

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

8 REPLIES 8
Rahber
Super User
Super User

You can use this dynamic expression

if(empty(items('Apply_to_each')?['Status']),'Empty',items('Apply_to_each')?['Status'])

items('Apply_to_each')?['Status'] is my SharePoint variable int this case, you can replace with yours

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

I tried this but its not working. Not sure if my syntax is off.

 

PowerBI87_0-1595268060723.png

 

No Sir, not this way.

 

This needs to be a dynamic expression.  and to know the expression for share point value however on the share point item and you will see the value that you have to use in dynamic expression

expression.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

I see, I am not able to grab dynamic content from "For a Selected Item", only "Get Item"

 

PowerBI87_0-1595277190299.png

PowerBI87_1-1595277251918.png

 

Tried this:

PowerBI87_1-1595279914163.png

 

PowerBI87_0-1595279883683.png

 

if(isblank(variables('FW')),'Empty',items()?[variables('FW')])
 
Getting error " 
Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The template action 'Compose_2' at line '1' and column '9641' is not valid: "The template language function 'items' must have at least one parameter.".'.'"
 

 

yashag2255
Dual Super User II
Dual Super User II

Hi @PowerBI87 

 

You can check out this post as well: https://www.bythedevs.com/post/how-to-pass-a-null-value-as-an-input-while-using-a-manual-trigger-in-...

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Use

 

if(empty(variables('FW')),'Empty',variables('FW'))

items()?[variables('FW')] is not a correct expression

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

Thank you so much for this!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,362)