Skip to main content
Newcomer
June 2, 2026
Question

Modifying SQL Editor component in Dynamic Dashboards not working

  • June 2, 2026
  • 1 reply
  • 0 views

Hi there,

I'm working on a client using the version 8.5.2 and I'm trying to use the Dynamic Dashboards functionallity to modify a property from a SQL Editor Component.

The purpose of this logic is to set a dashboard in "ReadOnly" mode when the parameter is set, and in this case, the read only mode I want to achieve is by setting "ShowDataManipulationButtons = False".

The BR logic used is the following:

If Component.DashboardComponentType = DashboardComponentType.SqlTableEditor Then
Dim sqlDefinition = XFSqlTableEditorDefinition.ReadXmlString(si,Component.XmlData)
sqlDefinition.ShowDataManipulationButtons = False
Component.XmlData = sqlDefinition.WriteXmlString(si)
End If
 
I have checked that after this point the component XmlData has changed, however, despite returning the modified component, the changes as not being displayed in the dashboard.
If instead of modifying an SqlEditor component, I change any property on a Button component, the changes are being displayed correctly.
 
Is this a known issue for the version 8.5.2 or is there any specific thing I might be missing for the SqlEditor component?
 
PD: I know I can achieve creating a copy of the component, but it doesn't makes sense to do something twice (or ten times) when there is a way to solve it dynamically once for all.
 
Thank you in advance!

1 reply

OneStream Employee
June 5, 2026

Hi ogonzalez

I think you need to save the dynamic component after you've changed it.

Im not in front on my PC at the moment but there is a method on the api called something like SaveDynamicComponentState

That should ensure any changes you make are reflected in the component collection returned 

Hope this helps

Sam

OneStream Employee
June 5, 2026
api.SaveDynamicComponentState(si, dynamicDashboardEx.DynamicDashboard,dynamicComponent.DynamicComponentEx, WsDynamicItemStateType.EntireObject);

 

ogonzalezAuthor
Newcomer
June 10, 2026

Hi sameburn​ ,

That sounded promising but unfortunately nothing changed.

Looks like that method must be executed already after the "GetDynamicComponentsForDynamicDashboard" function, doesn't it?

Any other component modification I have tried has worked fine, it's just the SqlEditor component that is not taking any modifications.

Thank you!