diff --git a/python/PyQt6/core/auto_additions/qgis.py b/python/PyQt6/core/auto_additions/qgis.py
index 3f0acb5a87d..e19a4688905 100644
--- a/python/PyQt6/core/auto_additions/qgis.py
+++ b/python/PyQt6/core/auto_additions/qgis.py
@@ -6928,6 +6928,7 @@ Qgis.FieldDomainSplitPolicy.baseClass = Qgis
Qgis.FieldDomainMergePolicy.DefaultValue.__doc__ = "Use default field value"
Qgis.FieldDomainMergePolicy.Sum.__doc__ = "Sum of values"
Qgis.FieldDomainMergePolicy.GeometryWeighted.__doc__ = "New values are computed as the weighted average of the source values"
+Qgis.FieldDomainMergePolicy.UnsetField.__doc__ = "Clears the field value so that the data provider backend will populate using any backend triggers or similar logic \n.. versionadded:: 3.44"
Qgis.FieldDomainMergePolicy.__doc__ = """Merge policy for field domains.
When a feature is built by merging multiple features, defines how the value of
@@ -6938,6 +6939,10 @@ attributes following the domain are computed.
* ``DefaultValue``: Use default field value
* ``Sum``: Sum of values
* ``GeometryWeighted``: New values are computed as the weighted average of the source values
+* ``UnsetField``: Clears the field value so that the data provider backend will populate using any backend triggers or similar logic
+
+ .. versionadded:: 3.44
+
"""
# --
diff --git a/python/PyQt6/core/auto_generated/qgis.sip.in b/python/PyQt6/core/auto_generated/qgis.sip.in
index 2c8ae9e630e..dc3d83001c0 100644
--- a/python/PyQt6/core/auto_generated/qgis.sip.in
+++ b/python/PyQt6/core/auto_generated/qgis.sip.in
@@ -2112,6 +2112,7 @@ The development version
DefaultValue,
Sum,
GeometryWeighted,
+ UnsetField,
};
enum class FieldDuplicatePolicy /BaseType=IntEnum/
diff --git a/python/core/auto_additions/qgis.py b/python/core/auto_additions/qgis.py
index a45fb29ec11..d3968d16e6d 100644
--- a/python/core/auto_additions/qgis.py
+++ b/python/core/auto_additions/qgis.py
@@ -6862,6 +6862,7 @@ Qgis.FieldDomainSplitPolicy.baseClass = Qgis
Qgis.FieldDomainMergePolicy.DefaultValue.__doc__ = "Use default field value"
Qgis.FieldDomainMergePolicy.Sum.__doc__ = "Sum of values"
Qgis.FieldDomainMergePolicy.GeometryWeighted.__doc__ = "New values are computed as the weighted average of the source values"
+Qgis.FieldDomainMergePolicy.UnsetField.__doc__ = "Clears the field value so that the data provider backend will populate using any backend triggers or similar logic \n.. versionadded:: 3.44"
Qgis.FieldDomainMergePolicy.__doc__ = """Merge policy for field domains.
When a feature is built by merging multiple features, defines how the value of
@@ -6872,6 +6873,10 @@ attributes following the domain are computed.
* ``DefaultValue``: Use default field value
* ``Sum``: Sum of values
* ``GeometryWeighted``: New values are computed as the weighted average of the source values
+* ``UnsetField``: Clears the field value so that the data provider backend will populate using any backend triggers or similar logic
+
+ .. versionadded:: 3.44
+
"""
# --
diff --git a/python/core/auto_generated/qgis.sip.in b/python/core/auto_generated/qgis.sip.in
index f6e2c40a25d..f70979dd964 100644
--- a/python/core/auto_generated/qgis.sip.in
+++ b/python/core/auto_generated/qgis.sip.in
@@ -2112,6 +2112,7 @@ The development version
DefaultValue,
Sum,
GeometryWeighted,
+ UnsetField,
};
enum class FieldDuplicatePolicy
diff --git a/src/app/browser/qgsinbuiltdataitemproviders.cpp b/src/app/browser/qgsinbuiltdataitemproviders.cpp
index 121d0bce532..df2560a630f 100644
--- a/src/app/browser/qgsinbuiltdataitemproviders.cpp
+++ b/src/app/browser/qgsinbuiltdataitemproviders.cpp
@@ -2244,6 +2244,9 @@ QString QgsFieldDomainDetailsWidget::htmlMetadata( QgsFieldDomain *domain, const
case Qgis::FieldDomainMergePolicy::GeometryWeighted:
metadata += tr( "Use geometry weighted value" );
break;
+ case Qgis::FieldDomainMergePolicy::UnsetField:
+ metadata += tr( "Unset field" );
+ break;
}
metadata += QLatin1String( "\n
" );
diff --git a/src/core/qgis.h b/src/core/qgis.h
index 701dfaa6d32..9fd70ae67f5 100644
--- a/src/core/qgis.h
+++ b/src/core/qgis.h
@@ -3729,6 +3729,7 @@ class CORE_EXPORT Qgis
DefaultValue, //!< Use default field value
Sum, //!< Sum of values
GeometryWeighted, //!< New values are computed as the weighted average of the source values
+ UnsetField, //!< Clears the field value so that the data provider backend will populate using any backend triggers or similar logic \since QGIS 3.44
};
Q_ENUM( FieldDomainMergePolicy )
diff --git a/src/core/qgsogrutils.cpp b/src/core/qgsogrutils.cpp
index e376b8a2432..21e7361d031 100644
--- a/src/core/qgsogrutils.cpp
+++ b/src/core/qgsogrutils.cpp
@@ -2298,6 +2298,10 @@ OGRFieldDomainH QgsOgrUtils::convertFieldDomain( const QgsFieldDomain *domain )
case Qgis::FieldDomainMergePolicy::Sum:
OGR_FldDomain_SetMergePolicy( res, OFDMP_SUM );
break;
+
+ case Qgis::FieldDomainMergePolicy::UnsetField:
+ // not supported
+ break;
}
switch ( domain->splitPolicy() )