diff --git a/src/meshTools/PatchFunction1/ConstantField/ConstantField.C b/src/meshTools/PatchFunction1/ConstantField/ConstantField.C
index 5ef4d1d974c53bea1833330964b14e381708745e..06509433232473b879911b33b3ca793185094735 100644
--- a/src/meshTools/PatchFunction1/ConstantField/ConstantField.C
+++ b/src/meshTools/PatchFunction1/ConstantField/ConstantField.C
@@ -253,8 +253,17 @@ void Foam::PatchFunction1Types::ConstantField<Type>::writeData
 ) const
 {
     PatchFunction1<Type>::writeData(os);
-    //os  << token::SPACE << value_ << token::END_STATEMENT << nl;
-    value_.writeEntry(this->name_, os);
+
+    if (isUniform_)
+    {
+        os.writeKeyword(this->name_)
+            << "constant " << uniformValue_
+            << token::END_STATEMENT << nl;
+    }
+    else
+    {
+        value_.writeEntry(this->name_, os);
+    }
 }