cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
newautomater
Regular Visitor

Error message: The runtime value '"null"' to be converted doesn't have the expected format 'String/date'.

Hi all,

 

I am trying to build a flow from Forms to a Sharepoint list. If a user clicks a radio button, I want it to capture a timestamp and if the user does not click the radio button, I want it to be blank. I am using the following formula, which successfully leaves a timestamp if the radio button (called Family Residential Standards (Y)) is clicked but fails to leave a blank value if unclicked. :

 

if(equals(outputs('Get_response_details')?['body/raaf025e6861c4388bb22f0fc4dbf2bb'],'Family Residential Standards (Y)'),outputs('Get_response_details')?
['body/submitDate'],'null')
 
It returns the error: The runtime value '"null"' to be converted doesn't have the expected format 'String/date'.
 
I've tried removing the ''. Any suggestion on how to fix this code to leave a blank cell value in unclicked?
1 ACCEPTED SOLUTION

Accepted Solutions
newautomater
Regular Visitor

I solved this via following syntax:

 

if(empty(outputs('Get_response_details')?['body/raaf025e6861c4388bb22f0fc4dbf2bb']),null,outputs('Get_response_details')?['body/submitDate'])

View solution in original post

2 REPLIES 2
newautomater
Regular Visitor

I solved this via following syntax:

 

if(empty(outputs('Get_response_details')?['body/raaf025e6861c4388bb22f0fc4dbf2bb']),null,outputs('Get_response_details')?['body/submitDate'])
Hardesh15
Super User
Super User

@newautomater 

1.Please do not put null in quotes. Select or type only null.

2. try with empty function.

 

Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

@Hardesh

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,355)