The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
ogonzalez
22 days agoNew Contributor II
Modifying SQL Editor component in Dynamic Dashboards not working
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!
4 Replies
- sameburn
OneStream Employee
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
- sameburn
OneStream Employee
api.SaveDynamicComponentState(si, dynamicDashboardEx.DynamicDashboard,dynamicComponent.DynamicComponentEx, WsDynamicItemStateType.EntireObject);- ogonzalezNew Contributor II
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!
Related Content
- 5 months ago
- 2 years ago
- 3 years ago