Jump to content
We've recently updated our Privacy Statement, available here. ×

How to Browse Text file from Web client and pass the unique concatenated value to property.


Anil Damamkar

Recommended Posts

Hi

I want to browse txt file from spotfire webclient,which has list of string values.

we need to pass UniqueConcatenatedoutput string to document property.

test.txt

A

B

C

Output in doument property:

A,B,C

I tried to do using Javascript, but unable to pass output string to document property.

Attaching DXP.

Any other approach is appreciated.

please help.

Link to comment
Share on other sites

  • 1 month later...

If you just insert script section in HTML before instead of js it works in Spotfire Analyst

$("#main input").focus();

var reader = new FileReader();

function readText(that){

if(that.files && that.files[0]){

var reader = new FileReader();

reader.onload = function(e) {

var output=e.target.result;

output=output.split("n").join(",");

//alert(output);

document.getElementById('main').innerHTML= output;

};//end onload()

reader.readAsText(that.files[0]);

}//end if html5 filelist support

}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...