cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CABIRD
Level: Powered On

Add a condition - Edit in advanced mode

Flow connects to Power App, and forwards images to SPO using Mikael Svenson excellent article Saving a collection of images from PowerApps to SharePoint using Microsoft Flow .

Requirement to add condition in advance mode.

@not(empty(item()))

Read 'Build more powerful conditions in flows and more'

Tried contains  as the above article suggest and this fails.

AddCondition.png

Read other support document pages. To name one Add a condition to a flow .

Thank you in advance for any suggestions to resolve this.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Add a condition - Edit in advanced mode

Hi @CABIRD ,

 

Maybe my previous post has caused you a wrong guide. If you have succeeded before, you could still configure a similar Flow according to your previous method.

The only thing that seems to change is that you can no longer use advanced mode when configuring Condition.

I noticed that the article you provided is using Filter array to exclude null values. It seems that you could use Filter array directly.

 

Best Regards,

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

View solution in original post

8 REPLIES 8
Community Support Team
Community Support Team

Re: Add a condition - Edit in advanced mode

Hi @CABIRD ,

 

Advanced mode has been removed from Condition, you could use expression directly to achieve your needs.

According to your description, it seems that you want to determine if item() is empty, please try the following configuration.

34.PNG

 

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CABIRD
Level: Powered On

Re: Add a condition - Edit in advanced mode

Hello @v-bacao-msft 

 

Thank you for taking the time to reply to my request for assistance. Sadly this failed. 

Fail.png

Error message as follows:
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('ProcessPhotos')' is of type 'String'. The result must be a valid array.

Flow4.png

 

Best wishes

Christopher

Community Support Team
Community Support Team

Re: Add a condition - Edit in advanced mode

Hi @CABIRD ,

 

This shows that the value in ProcessPhotos is a String instead of an array.

Apply to each needs to traverse the array, so this problem has arisen.

And generally use Expression is not directly in Inputs field input expression, we need to edit it in Expression and then apply it, like:

8.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CABIRD
Level: Powered On

Re: Add a condition - Edit in advanced mode

Hello @v-bacao-msft 

 

Thank you for replying. I really appreciate you taking the time to do so.

Split.png

Regrettably

split(item(),'|')[0]

failed see error message below

InvalidTemplate. Unable to process template language expressions in action 'ProcessPhotos' inputs at line '1' and column '2608': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'.

 

Previously I had Compose input code see below

@split(triggerBody()['@{triggerBody()['ProcessPhotos_Inputs']}],"#")

Fail-1.png 

Community Support Team
Community Support Team

Re: Add a condition - Edit in advanced mode

Hi @CABIRD ,

 

You don't seem to be configuring Flow according to the methods mentioned in the article you provided.

I have previously found that you are not using Expression correctly, so an example of using Expression is provided. But this is not what you need to configure in ProcessPhotos.

Please follow the method provided in the article to configure Flow. If there is any change in feature that makes you confused, please post it.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CABIRD
Level: Powered On

Re: Add a condition - Edit in advanced mode

Hello @v-bacao-msft 

 

I have very carefully created a number of new Flows yet each time they break. Without question they appears to be a bug within Flow. I have had this working in the past. 

Community Support Team
Community Support Team

Re: Add a condition - Edit in advanced mode

Hi @CABIRD ,

 

Maybe my previous post has caused you a wrong guide. If you have succeeded before, you could still configure a similar Flow according to your previous method.

The only thing that seems to change is that you can no longer use advanced mode when configuring Condition.

I noticed that the article you provided is using Filter array to exclude null values. It seems that you could use Filter array directly.

 

Best Regards,

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

View solution in original post

CABIRD
Level: Powered On

Re: Add a condition - Edit in advanced mode

Reading Mikael Svenson excellent article Saving a collection of images from PowerApps to SharePoint using Microsoft Flow has helped to get it working (sort of) with some changes for example double quotes are not liked at all. 

 

I know the issue of uploading images to SharePoint from Power Apps using Flow has been on many peoples wish list and it's not surprising. I do think Microsoft should at least either add a connector or just make it easier. Good Microsoft documentation with worked examples on the topic would be a excellent first step. Microosft Documentation needs to be updated when changes occur. All to often old documentation largley remains relevant but won't quite work due to small changes. Users really shouldn't have to spend days tracking down solutions. 

 

Thank you for your help. I appreciate you taking the time to be of assistance. 

 

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,791)