web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue with conditional...
Power Automate
Suggested Answer

Issue with conditional fields in MS Form to SharePoint List

(1) ShareShare
ReportReport
Posted on by 122
I have a Microsoft Form called 'Attendance Action'. It has the following fields:

First Name
Last Name
DAS ID
Date of Discipline Action - Its in MM/dd/yyyy format
Which Point Bucket Was Discipline Action For - It has got 2 options. They are 'Absence' and 'Tardy'. Users need to select either of them
Action Type - There are 5 options and any one of these need to be selected. They are 'Verbal Warning', 'Written Warning', 'Termination', 'Dr Note' and 'FMLA'. The moment users select either of 'Verbal Warning', 'Written Warning' or 'Termination', another field called 'Date of Event' gets activated/visible and users need to select a date which is in MM/dd/yyyy format and then hit on Submit. Again, if the users select either of 'Dr Note' or 'FMLA' then 3 fields get activated/visible. They are 'Start Date', 'End Date' and 'Attachment'. 'Start Date' and 'End Date' fields are in MM/dd/yyyy format and 'Attachment' allows the users to attach/upload a document. It must be noted when either of 'Dr Note' or 'FMLA' is selected, we don't have the field 'Date of Event' anymore.

I have a SharePoint List called 'Attendance Action' with the same field/column names where I would like to get data from Forms to populate using Power Automate.
 
For your reference, I am sharing my Flow. No matter how I try, I always end up getting the below error:

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

Sometimes the error is on StartDate and if I select anything else in the Form then the error will refer to EventDate
Categories:
I have the same question (0)
  • Kameshm05 Profile Picture
    302 Moderator on at
    Hi,

    The date type column doesn't accept the empty string values you used. Please handle all the date columns like below syntax. you have to map null value for the empty date string. Replace fieldnameid with the date column fieldId from the Get Response Details action.

    Please reply here if it is not works
    if(empty(body('Get_response_details')?['fieldnameid']), null, body('Get_response_details')?['fieldnameid'])
    
    Thanks
  • Suggested answer
    CU06081659-0 Profile Picture
    122 on at
    Hi Kameshm05 209,
     
    I even tried with your solution but got the same error message. Finally I came across this YT video and it solved my purpose

    MS Forms File Upload to SharePoint - YouTube

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard