HTML in Spotfire and IronPython - html

I want to make a drop down list in spotfire using html. So based on choice selected I want to show custom divs. How to implement that ?? Can anyone help with the ironpython script

Do you want to use ironpython or do you want to use HTML? There is no need to use both although you could make a solution with both.
Anyway this question shows you how to do it with HTML and JavaScript, both of which I believe you can use in Spotfire.
Drop down list - display div when clicking an option

You will want to create that script that is activated by your Property Control. The Property control would dynamically change a different textbox in the visualization. The code you would use would look a bit like this:
from Spotfire.Dxp.Application.Visuals import HtmlTextArea
outputVis = output.As[HtmlTextArea]()
outputVis.HtmlContent = "<p>"

What you can do is add a new text area. Then, add a drop down list in this text area. You can create a new Document.Properties linked to this drop down list.
You can create many options in your drop down list, and your Document.Properties will have the selected value of your drop down list.
Text Area could be designed in HTML/CC so you can customize as you want.
Once you have your Document.Properties with the drop down list value, you can go on your chart properties and add a custom expression with your Document.Properties like [MyCol]==$(docproperties)
I hope it will help you !

Related

How to write the JSON code for adding scroll bar to a cell in SharePoint list column?

I am not a developer but, I was trying to create a SharePoint list for online tracking of all open items in our team site. I was able to get the following code to standardize the font and font size for the columns through the below code
{
"$schema":"http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"elmType":"div",
"style":{
"font-weight":"bold",
"font-family":"Trebuchet MS",
"font-size":"13px",
"font-size-adjust":"0.58"
},
"txtContent":"#currentField"
}
For two columns containing significant text content, I wanted to limit the maximum row height and introduce vertical scroll bar but, am unable to understand what will be the code and how to add it to the above written code .
Any help or guidance will be highly appreciated.
Thanks in advance.
Running the new code as proposed by #Thriggle did not reduce or modify the row-height of the column.
FURTHER EDIT
JSON code is being added in the List Settings section and choosing individual columns.
--
Kind Regards,
Nilotpal
You can add style properties to define how the cell should display.
The key additions to your style block would be "overflow-y":"auto" and "max-height":"50px" (replacing 50px with whatever maximum height you desire).
Your updated JSON for the advanced column formatting would look something like this:
{
"$schema":"http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"elmType":"div",
"style":{
"font-weight":"bold",
"font-family":"Trebuchet MS",
"font-size":"13px",
"font-size-adjust":"0.58",
"overflow-y":"auto",
"max-height":"50px"
},
"txtContent":"#currentField"
}
Edit for clarity, here's where you'd add that JSON:
On the list view, click the view selector and choose to format the current view
Instead of applying the formatting to the entire row, add it to the desired column.
Click the link to enter "Advanced mode"
Paste in your JSON declarations and hit the Preview button to see if it works
Alternatively, you can go to the list settings page, then to the settings for the specific column to which you want to apply the formatting, and add the JSON to its Column Formatting setting. This will apply to all views of the list instead of just to the one view.
For all those reading this question, please note the key point of using JSON code formatting feature is that it will be available in "Modern" view of the SharePoint list. The coding shared in the ongoing conversation will provide the desired impact only if the SharePoint list is being viewed in the "modern" OR "new" experience.

tag to create a description field

i want to create a drop down box with a number of items such that when the user checks the item in the drop down a description will appear on the side of the page. which tag in html allows me to create this description field that depends on the item in the drop down. Thank you
You cannot do this only with HTML, you have to use some CSS and Javascript to achieve this... you can use the CSS property display to show / hide the description box and javascript onchange function to check when an option in a drop down box is selected / changed..

Is there a way to show a multiselect list box as combobox(single select) but on opening should give multi select

I am looking for a way where multi select list box should display as normal single select combobox but on click it should work as list box allowing multi selct like show below as in spreadsheet. I am looking for solution in CSS HTML and javascript rather than in Jquery.
You can't make an element behave like that, but you can make something that looks like a dropdown list, and when the user clicks on it, display a popup/popout with a select that allows multiselect (has the size property set).
you can do this by jQuery MultiSelect and here is the demo

Custom ComboBox with Horizontal line in DropDown

I want to create a Custom ComboBox in which the DropDown contains the Horizontal Line or you can say HRule immediate after the First Item. here I am providing you the image For that you can see i have used paint to draw the HRule i want component similar like that. Please provide me valuable Links or code for that. Here is the Image.
Thanks in Advance
Have # nice Day...
Here is your answer : How to add a separator to your ComboBox

Hide arrow in standard dropdown?

Is there a a way to hide the arrow in a standard dropdown select fieldset?
Fiddle link
I have an autocomplete system where you fill in the organisation number of a company and it finds the info based on a database. I'd like to have the select box, but without the arrow..
I need it to do this as it's a double function form, either you can fill in your ORG nr or just manually type it in, pretty simple, probably used all over the internet.
Thanks :)
Kyle,
Usually autocomplete systems use input text elements instead of a select element. This creates what you are trying to achieve. Google is a classic example of this.
If you want, you can take a look at jQuery's autocomplete plugin to get another example and some code ideas, or whatever. http://docs.jquery.com/Plugins/Autocomplete
It's not easy, but you can fake it by putting a button above a Select that has its size property set to a value greater than 0.
Have the Select hidden and positioned absolutely under the button. Clicking the button shows the list. Selecting the list changes the text on the button and re-hides the Select.
This way you need a text box, because you cannot type anything in <select> tag.
And put an onclick event to this box to open autocomplete with all possible values.