Jump to content

Vanessa Virginia Sucre Gonzalez

Spotfire Team
  • Posts

    17
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vanessa Virginia Sucre Gonzalez's Achievements

  1. Go to Data > Data Connection Settings > Data Connection > Credentials
  2. Hi, Make sure you have the following settings for your data source:
  3. Hi @Anil_dhiman, I don't think there is a way to create a switch button to enable/disable download dxp option. You can however change the WEBPLAYER configuration or edit Spotfire licenses so specific users are able or unable to download
  4. Hi Alan, so the idea is to have a range filter with an specific range focused and be able to move that specific range with up and down buttons for example? I think I have a good idea for a solution but I want to get everything clear
  5. If you want a more efficient code (instead of checking every X seconds, you could use this one to be launched every time the calculated value changes. //this is the target element to monitor changes //just put the span id here. You can remove next line and add a script param called targetDomId var targetDomId = "calcVal" //no need to change after this line. var target = document.getElementById(targetDomId) //callback is the function to trigger when target changes var oldVal = target.innerText.trim() var callback = function(mutations) { newVal=$("#calcVal").text().trim(); if(newVal!=oldVal){ $("#inputPropertyControl input").val(value).blur(); } oldVal = newVal; } //this is to glue these two together var observer = new MutationObserver(callback); var opts = { childList: true, attributes: true, characterData: true, subtree: true } observer.observe(target,opts);
  6. Hi @achen1, I would create a calculated value (filtered by the corresponding filter scheme) with a RowCount() expression. This value will be pass to a document property using javascript. Within the code you will save the value into the document property ONLY when its changes, this way the Iron Python script is triggered. The javascript would be something like this: var oldValue=0 transferValue = function(){ //get value from calcVal spotfire Calculated Value Dyn Item value=$("#calcVal").text().trim() //update input when oldValue changes if(value!=oldValue){ $("#inputPropertyControl input").val(value).blur(); } oldValue=value } setInterval(transferValue,3000) //3 times per second And this your HTML <span id="calcVal" style="display:none"><SpotfireControl id="95ca117d24b347a6923498cf495fb245" /></span> <span id="inputPropertyControl" style="display:none"><SpotfireControl id="b98bc60cd1824746aacd1e1a747f42f9" /></span> Your calculated value calcVal changes every time you change a filter in the filter panel And the document property inputPropertyControl will store that value and run the sccript
  7. Hi @achen1 Could this script work for you? from Spotfire.Dxp.Data import * from Spotfire.Dxp.Application.Visuals import * #setup rows to select from rows to include rowCount=table.RowCount rowsToInclude = IndexSet(rowCount, True) # Create a cursor to the Column we wish to get the values from cursor = DataValueCursor.CreateFormatted(table.Columns["myCol"]) # Loop through all rows, retrieve value for specific column, # Get the first value from the column for row in table.GetRows(rowsToInclude, cursor): rowIndex = row.Index if rowIndex == 0: myTitleValue = cursor.CurrentValue break; # Get myVis as a Visualization myVis = VisualElement.As[Visualization]() # Show (or hide) the title myVis.ShowTitle = True # Change the title myVis.Title = 'My New Title has this value -> ' + myTitleValue
  8. Hi @Enkeled Kanaj, You should be able to write queries just as you do it on your sql client
  9. Hi @Shweta Mishra @achen1 I've built a basic script that could help you achieve what you want. I'm attaching a dxp below :) Let me know if you have any doubts or questions Open hyperLink.dxp
  10. Hi @achen1 You'll have to create a calculated column with the filtered values, and use that one for your combobox. You'll need some scripting, both IronPython and Javascript. I made a quick example for you :) you have a Region List that filters the Country Name Combobox. If you have any questions please let me know! filtered Combobox.dxp
  11. Hi, Just go to the main panel, select filter Now, add the column directly from the data source table: You have to change the expression (1% is mandatory, it's your column's placeholder). I see you are using Oracle, so the expression would be %1 - 1 Now you save the filter, and add it to your information link:
  12. Hi, Assuming you have a column within your data table with "today's date" (ex. Now()), you can create a filter element as follow: Where Today holds today's date. Now, Add the filter to your information link:
  13. Hi @RJain I created an IronPython script to sort table visualisations with marked rows in first position with no need of an extra Sort By column. The script first creates a Custom Sort Order (this will ONLY apply to String data columns). Once the Data column is sorted, you apply it directly to the visualisation (In this case, our data table, but you could use any type). Here I leave the code and a dxp with the working example: from System.Collections.Generic import List from Spotfire.Dxp.Data import * from System.Reflection import Assembly from Spotfire.Dxp.Data.Collections import * from System.Runtime.Serialization import ISerializable from System.Collections import IComparer from System.Collections.Generic import IComparer from Spotfire.Dxp.Application.Visuals import * class MarkData: def __init__(self, value, mark): self.value = value self.mark = mark def __repr__(self): return repr((self.value, self.mark)) cursor = DataValueCursor.CreateFormatted(dataTable.Columns["ATA"]) markings = Document.ActiveMarkingSelectionReference.GetSelection(dataTable) markedata = [] for row in dataTable.GetRows(markings.AsIndexSet(),cursor): value = cursor.CurrentValue markedata.append(MarkData(value, 1)) for row in dataTable.GetRows(markings.AsIndexSet().AsWritable().Not(),cursor): value = cursor.CurrentValue markedata.append(MarkData(value, 0)) sortedMarkedata = sorted(markedata, key=lambda value: -value.mark) sortList = List[str]() for item in sortedMarkedata: sortList.Add(item.value) print(item.value) dataTable.Columns["ATA"].Properties.SetCustomSortOrder(sortList) myVis = myVis.As[Visualization]() dataTable = myVis.Data.DataTableReference myVis.SortInfos.Clear() myVis.SortInfos.Add(dataTable.Columns.Item["ATA"], TablePlotColumnSortMode.Ascending) PARAMETERS: myVis -> Data Table Visualisation dataTable -> Your Data table with the Column you want to sort Please let me know if this solution works for you :) Sort By Marking.dxp
  14. Hi Cecilia, You could try (if it's ok for you) to disable the mod trust validation: 1. On the Spotfire Server machine, open an Administrators command prompt and move to <TSS Installation Directory>/tomcat/spotfire-bin 2. Export current configuration through the command (Windows) ./config.bat export-config -t TOOL_PASSWORD 3. Set the configuration property through the command: (Windows) ./config.bat set-config-prop -n "security.code-trust.validate-uploaded-cert" -v "false" 4. Import the updated configuration to the database through the command: (Windows) ./config.bat import-config -c "comment your change" -t TOOL_PASSWORD 5. Restart the server. Also, check if the Automation Services User is able to trust mods. Regards,
×
×
  • Create New...