I have a form with multiple fields where not all fields need to be filled in. This form data gets added to a record on a sharepoint list. if all fields on the sharepoint list are text, the flow runs fine but if i have some date and number fields on the list and these corresponding form fields are blank, the flow fails with error E:G
The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Mileage1_Claim_Date' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'.
Can anyone help me with this. getting no where
Solved! Go to Solution.
Hi @Lochwood ,
Please refer to the following method to configure Date field:
Expression reference:
if(empty(outputs('Compose')),null,outputs('Compose'))
Hope this helps.
Best Regards,
Hi @Lochwood
Is your date field 'Mileage1_Claim_Date' value getting blank from the forms. Is that optional?
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogYes I have 15 date fields and 15 number fields.. only some date and number fields get filled in at any one time. Mileage1_Claim_Date is one of those date fields.
Hi @Lochwood
So that's your issue is. Check the value is empty or null then don't format the date.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogTry the below expression.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogcan you help with how i do that?
Hi @Lochwood
Remove the current datetime mapping. Then on the right hand side you need to click the expression tab. Use the expression I sent you earlier and replace the values accordingly.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogso am i right in saying i have to input some sort of date and cannot leave it blank? i have used your example with a 'use the formatted datetime expression' of 1/1/1900 and it worked. THANK YOU!! is there no way to have the field null in the list?
Just realised this is actually replacing form data as well as empty fields. Here is my example.
if(not(empty('body/rd4b46c30f2294fc683cdb016fc586b1d')), '0', '')
i have also tried
Believe your expression mapping is in SharePoint Create Item action? Not sure how its replacing the form data. Not sure I understood it correctly.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blog
Hi @Lochwood ,
Please refer to the following method to configure Date field:
Expression reference:
if(empty(outputs('Compose')),null,outputs('Compose'))
Hope this helps.
Best Regards,
Thanks for this.. Do i have to create a compose for each field? i have 30 fields so this would be 30 compose statements.
Hi @Lochwood ,
In fact, you don't need to use Compose, I just want to explain this method to you.
You could configure expression directly in the field of Create item action, like:
You can configure the fields in the Create item action like I configured Compose.
You can do similar operations for each answer or field.
Best Regards,
I know this was years ago, but thank you for including the GIF. I've looked through various explanation of this solution and could not figure it out until I saw the step by step process.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
27 | |
27 | |
26 | |
13 | |
12 |
User | Count |
---|---|
58 | |
51 | |
30 | |
27 | |
27 |