What I am trying to do is there is a date field that is not mandatory and therefore sometimes it can be blank. However, if I put 2 expressions in like below I will get an error. Please help advise what i did wrong.



This was my expression.
if(empty(outputs('Get_response_details')?['body/r2f6ed29f6e16484c8c527e714dcfdd4e'],null),'',formatDateTime(outputs('Get_response_details')?['body/rfd4e3f0d089e4c74961e10b0e3b1ad60'],'g'))

The planned date 1 and New date 1 can be blank. while the planned date and new date are required fields.