diff --git a/src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs b/src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs index 6b3cd5f810..2c512d7373 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs @@ -2873,12 +2873,20 @@ public override void Visit(FirstNameNode node) isConstantNamedFormula = formula.IsConstant; } } - else if (lookupInfo.Kind == BindKind.Data) - { - if (lookupInfo.Data is IExternalCdsDataSource or IExternalTabularDataSource) - { - _txb.SetMutable(node, true); - } + else if (lookupInfo.Kind == BindKind.Data) + { + if (lookupInfo.Data is IExternalCdsDataSource or IExternalTabularDataSource) + { + _txb.SetMutable(node, true); + } + else if (lookupInfo.Data is IExternalDataSource ds) + { + _txb.SetMutable(node, ds.IsWritable); + } + } + else if (lookupInfo.Kind == BindKind.ScopeCollection) + { + _txb.SetMutable(node, true); } Contracts.Assert(lookupInfo.Kind != BindKind.LambdaField);