Nithin Jacob Posted June 12, 2019 Share Posted June 12, 2019 Hi, In my dashboard I want to know whether the user is using the spotfire analyst version or the web version. I am able to get it using this code in ironpython applicationType =Application.GetType().ToString() Now what I need is, to pass this value to javascript so that I can hide some features from web users Thanks in advance Link to comment Share on other sites More sharing options...
Colin Gray 3 Posted June 14, 2019 Share Posted June 14, 2019 Hi there, You can do this if you have a TextArea on your page. So to do this follow these steps: Create a document property to hold the result ofApplication.GetType().ToString() . In this example I call my property: "myNewProperty" Assign this in your ironpython script e.g. Document.Properties["myNewProperty"] =Application.GetType().ToString() Add a calculated value into a TextArea and set the value (by right clicking on it) to just be the document property value:"${myNewProperty}" Then wrap theSpotfire html tag in an HTML tag such as a div, and give it a unique ID: You can then reference the value inside this tag using Javascript using:$('#my-application-type').text().trim() Once you have it working, add a style of style="display: none" to your div tag so it is hidden from your users. I find it is useful to show the value initially just to check it is working correctly. There is a guide on this here also: https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-45505_ga=2.61478511.235987687.1560159550-1712820799.1560159550&_gac=1.245615024.1560251077.EAIaIQobChMI7MiHl6Th4gIVZrftCh28BgsIEAAYASAAEgJBefD_BwE Hope this makes sense, and gives you what you need. Thanks Colin Link to comment Share on other sites More sharing options...
Priyank Dwivedi Posted May 16, 2023 Share Posted May 16, 2023 hi. Thanks for the note.The link that you posted here is invalid. Could you validate please and fix? Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted May 16, 2023 Share Posted May 16, 2023 Please try this link:https://support.tibco.com/s/article/How-to-access-Text-Area-Document-Property-control-values-using-Java-Script-JQuery Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now