Aug 4, 2016

Spotfire Popup message with JS/javascript

Text area:

test




JS script:
$("#ada5d101fe90415aa047b7f47bb2d97e").click(showDialog);

function showDialog(){
   //change the title attribute since we can't in html editor
   $("#dialog").prop({title:'Rapid Security Analyzer Assumptions'}).dialog();
};


Aug 3, 2016

select spotfire lable value in javascript

$("#ce490455e9f2484eb8554b5d2c8b3e96").change(function()
{
var effecttivedate1= $("#31ff838711e24ca395dd9311413c298e").text();
alert(effecttivedate1);
}

Aug 1, 2016

Shell script to copy files around

function Copy-AssetLocally([PSObject] $DeploymentParameters)
{
Show-ConfirmationDeployAsset -DeploymentParameters $DeploymentParameters

if (-not (Read-Confirmation)) { return; }

Write-Host "Copy Asset to directory." -ForegroundColor $InfoColor
New-Item -Path $DeploymentParameters.TargetDirectory -ItemType Directory -ErrorAction Ignore

Copy-Directory `
-SourceDirectory $DeploymentParameters.SourceDirectory `
-TargetDirectory $DeploymentParameters.TargetDirectory

Write-Host "Done!" -ForegroundColor $InfoColor
}

Jul 25, 2016

Spotfire Property control validation using python script



Fund=Document.Properties["Fund"]
Document.Properties["FundError"]="";

if Fund<>"Select":
Document.ActivePageReference = Document.Pages[3]
else:
Document.Properties["FundError"]="Please select a fund."

Show/Hide Input Text Box based on Dropdown Selection using Jquery

using Jquery


//Triggering the script if Drop Down selection is varied
$("#163473c4bab648778b3e64c40463e3fc").change(function()

{
    var value = $("#163473c4bab648778b3e64c40463e3fc").val();  //To capture the index
    var vt = $("#163473c4bab648778b3e64c40463e3fc option:selected").text(); //To Capture the  selected text
    if(vt== "Enable")   //If the Drop Down selected value is Enable
    {
        $("#c8b6b12144864ec5889005c6260a4b08").show(); //Making the Input Box visible
    }
    else
    {
        $("#c8b6b12144864ec5889005c6260a4b08").hide(); //Making the Input box element hidden
    }
}
);