Javascript custom properties
I wrote javascript that creates a dashboard filter. I want my javascript to mark which filter it created. That way, on the next refresh, it can update or delete it if needed.
I've done that by creating a new property like this: dashboard.filters(choose the one I want).jaql.MyNewProperty = "true".
My question is: It's working for me now, but is this solution robust long-term? Any caveats I should be aware of? Are custom properties on widgets/filters/etc. a good tool for future projects?
Tim von Ahsen
Posted 2 years ago·Last reply 2 years ago
3 comments
Tim von Ahsen
OP2 years agoHi Daniel(s),
Thanks for your reply - it's reassuring seeing someone else working with custom properties like this.
"... add custom properties to the style or options properties ... dashboard.updateDashboard ..." - Thanks for the tip. I guess otherwise there's a chance the custom property gets lost depending on what combination of refresh/user-logout/server-reboot/etc. happens. My Version1 is storing the property within the filter object, which seems stable so far, but I'll shift it to dashboard.options if we find any issues.
"consult" - I'll keep you in mind. Good to know you're available as a resource.
DRay
·2 years agoHello Tim ,
I wanted to follow up to see if the solution offered by rapidbisupport worked for you.
If so, please click the 'Accept as Solution' button on the appropriate post, that way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.
Thank you.