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

Flow fails when a form field is left empty

I have a form to collect information from users when they're having problems with URLs'. We have three fields one is required and the other two are optional.  When I or anyone submits a form and only has the required field I get an error 

 

OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/OData__x0032__x002e_FolderorFileURL' is required to be of type 'String/uri'. The runtime value '""' to be converted doesn't have the expected format 'String/uri'.

 

I have seen others asking the same questions and it seems I need an expression but I can't understand the process. Anyone other there can help me

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Flow fails when a form field is left empty

Hola otra vez!

In this link you will find a similar issue, and the way to solve it:

https://powerusers.microsoft.com/t5/Using-Flows/Check-on-empty-choice-field-Form/td-p/337798

 If you want my advice, I would:

1.- add a Compose (REdactar) action blocks, assign as its input the response to the optional question from dynamic content menu. Let's rename the action block as 'Compose Optional 1'

2.- now on the 'Create item' related input, do not assign the response to the optional question, but the following WDL expression also from dynamic content menu:

 

if(empty(outputs('Compose_Optional_1')),'',outputs('Compose_Optional_1'))

 

 

Please note I am assuming your target Sharepoint list column is of type 'Single line of text'. If it is of type Choice (SElección), or Lookup (Búsqueda) we need a slightly different approach

 

If you are unfamiliar with WDL expressions, please follow these steps to add them to an action block (both the expression and the action block in the video are not related to this issue):

https://youtu.be/LPZ-WZoWwp4

Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

10 REPLIES 10
Highlighted
Dual Super User III
Dual Super User III

Re: Flow fails when a form field is left empty

Hola!

empty() based WDL expression should do the magic.

Can you share a screenshot from your current flow design?

The more information context you can post, the fastest other community members can provide a useful advice

Animo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Helper I
Helper I

Re: Flow fails when a form field is left empty

when a new response is submitted.JPG

Highlighted
Dual Super User III
Dual Super User III

Re: Flow fails when a form field is left empty

Hola otra vez!

In this link you will find a similar issue, and the way to solve it:

https://powerusers.microsoft.com/t5/Using-Flows/Check-on-empty-choice-field-Form/td-p/337798

 If you want my advice, I would:

1.- add a Compose (REdactar) action blocks, assign as its input the response to the optional question from dynamic content menu. Let's rename the action block as 'Compose Optional 1'

2.- now on the 'Create item' related input, do not assign the response to the optional question, but the following WDL expression also from dynamic content menu:

 

if(empty(outputs('Compose_Optional_1')),'',outputs('Compose_Optional_1'))

 

 

Please note I am assuming your target Sharepoint list column is of type 'Single line of text'. If it is of type Choice (SElección), or Lookup (Búsqueda) we need a slightly different approach

 

If you are unfamiliar with WDL expressions, please follow these steps to add them to an action block (both the expression and the action block in the video are not related to this issue):

https://youtu.be/LPZ-WZoWwp4

Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Highlighted
Helper I
Helper I

Re: Flow fails when a form field is left empty

Hola @efialttes ,

 

is there a way I can see an example of your advice

Highlighted
Dual Super User III
Dual Super User III

Re: Flow fails when a form field is left empty

Flow_FormsOptional.png



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Helper I
Helper I

Re: Flow fails when a form field is left empty

@efialttes  mil disculpas pero I am lost 

1.2.JPG

Highlighted
Dual Super User III
Dual Super User III

Re: Flow fails when a form field is left empty

@ggalindo 

Lamentablemente no puedo replicar tu Forms, he diseñado un ejemplo rápido.

 

Tienes al menos una pregunta opcional en tu cuestionario, ¿no?

Añadela al bloque 'Compose Optional 1' (Redactar)

 

Y ahora, ¿esa pregunta a qué entrada de 'Create item' la mapeabas? Sustituye ahí la pregunta por la expresión WDL que he sugerido

 

¿Tienes más de una pregunta opcional? ¿2?

En ese caso, dos bloques 'Compose': 'Compose Optional 1'  y 'Compose Optional 2'

Y necesitas dos expresiones WDL casi idénticas:

if(empty(outputs('Compose_Optional_1')),'',outputs('Compose_Optional_1'))
if(empty(outputs('Compose_Optional_2')),'',outputs('Compose_Optional_2'))

Ánimo!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Helper I
Helper I

Re: Flow fails when a form field is left empty

it's not working. I will looking for other solutions thank you for help @efialttes 

Highlighted
Helper I
Helper I

Re: Flow fails when a form field is left empty

@efialttes  muchas Gracias! after a few hours off I come back and looked at your advice and it works perfect- 

if(empty(outputs('Compose_Optional_1')),'',outputs('Compose_Optional_1'))

if(empty(outputs('Compose_Optional_1')),null, outputs('Compose_Optional_1'))

 

I only added the null to it and it works with all three optional fields I have. Again thank you so much  

Highlighted
Dual Super User III
Dual Super User III

Re: Flow fails when a form field is left empty

@ggalindo 

GOOD JOB!

CONGRATS!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,435)