Mark123 Posted August 22 Share Posted August 22 Hello,eyeryone Now in a text area, many controls need to be created, such as drop-down lists. I don't want to create them one by one with using the built-in controls, but rather generate them directly through IronPython script. Is there a way to achieve it? Link to comment Share on other sites More sharing options...
Solution Niko Maresco Posted August 22 Solution Share Posted August 22 hi Mark, unfortunately there are no APIs for instantiating Action or Property Controls or Dynamic Items :/ there is an entry in the Spotfire Idea Portal for this functionality, and i recommend voting for it so that it becomes a higher priority for the product team: https://ideas.spotfire.com/ideas/SPF-I-330 Link to comment Share on other sites More sharing options...
Mark123 Posted August 23 Author Share Posted August 23 9 hours ago, Niko Maresco said: hi Mark, unfortunately there are no APIs for instantiating Action or Property Controls or Dynamic Items :/ there is an entry in the Spotfire Idea Portal for this functionality, and i recommend voting for it so that it becomes a higher priority for the product team: https://ideas.spotfire.com/ideas/SPF-I-330 I got it.Thank you. Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted August 23 Share Posted August 23 (edited) As a work around, you can create html5 controls such as range sliders, dropdown, input, etc. and then parse those values to a single string document property in which you can later parse using Iron Python to fulfill your needs. Populating the controls can be tricky when you deal with large amounts of data. createJSControls.js textarea.html.txt parseData.py.txt JavaScript_Contorls_to_Document_Properties.dxp Edited August 24 by Jose Leviaguirre 1 Link to comment Share on other sites More sharing options...
jojojo Posted August 24 Share Posted August 24 Thank you for the good information. Is there a way to use iron python or javascript to quickly create text with '|' from the data table as written in textarea.html? Link to comment Share on other sites More sharing options...
Mark123 Posted August 26 Author Share Posted August 26 Nice weekend,Jose. This method is quite complicated, so I'd rather choose to create it one by one with built-in controls. But this method is an inspiration for other developments, thank you very much. 1 Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted August 26 Share Posted August 26 On 8/24/2024 at 8:30 AM, jojojo said: Thank you for the good information. Is there a way to use iron python or JavaScript to quickly create text with '|' from the data table as written in textarea.html? you can replace the pipe separated values with pipes "|" using a custom expression and place it as a label control on the text area <pre id="data" xhidden>City|State|Latitude|Longitude|Population|Average Temperature (F)|Air Quality Index|Observation Date <SpotfireControl id="label Property control here" /> </pre> Custom expression for the label property control Substitute(UniqueConcatenate( [City] & "|" & [State] & "|" & [Latitude] & "|" & [Longitude] & "|" & [Population] & "|" & [Average Temperature (F)] & "|" & [Air Quality Index] & "|" & [Observation Date]),", ","\n") 1 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