cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pallie
New Member

Conditional Flow creating 'invalid parameter value' error in PowerApps

I am trying to send an email with the inputted information from the rest of the app; I want the functionality of adding a picture from the camera and sending it as an attachment if the user desires to add a picture. 

 

I have implemented this with a condition in my flow (see Flow.png). I have added the appropriate fields necessary in my powerapp (see PowerAppFlowRun.png). It works when there is a picture taken in the app. However, when a user does not take a picture to add as an attachment, I get the following error:

 

 "The method 'Run' has an invalid value for parameter 'Compose_Inputs' "

 

For context, my picture goes through Compose so that it can be converted to binary, and ultimately show up in the email. This step occurs only if the flow condition evaluates to true.

 

I have a boolean value set in my app to indicate whether a picture was taken or not (HasAttachment), and this is what is used as the conditional test in the flow. I was under the impression that the app would only need/use 'Compose_Inputs' if there was a picture, and would ignore otherwise. 

 

Please let me know if there is something that I need to change in either my flow or my app!

 

Thanks in advance. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @pallie ,

 

While there is no need to add attachments when the HasAttachment is false, all pre-defined parameters still need to be passed into the flow in the correct format. So I recommend, when the HasAttachment is false, pass a Default Sample Image to the flow.

Replace the Gallery1.Selected.Photo to 

If(HasAttachment, Gallery1.Selected.Photo, SampleImage)

 

Snipaste_2020-07-20_14-50-09.png

Hope this helps.

Sik

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @pallie ,

You will need two different conversions for the two photo types. Photos taken from the camera control are stored in dataUri (as per yours), whereas the ones from the attachment are Base64.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-siky-msft
Community Support
Community Support

Hi @pallie ,

 

While there is no need to add attachments when the HasAttachment is false, all pre-defined parameters still need to be passed into the flow in the correct format. So I recommend, when the HasAttachment is false, pass a Default Sample Image to the flow.

Replace the Gallery1.Selected.Photo to 

If(HasAttachment, Gallery1.Selected.Photo, SampleImage)

 

Snipaste_2020-07-20_14-50-09.png

Hope this helps.

Sik

View solution in original post

@v-siky-msft 

Thank you for your reply! 

That solved my problem!

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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