# Marco Blom

## Primary tabs

Hi Lamont,

I do use the following in one of my applications:

ClientMethod Webbutton() [ Language = javascript ]
{
var table this.getComponentById('relationTable');
var index table.getProperty('selectedIndex');
if (index 0) {
alert('No row is selected in the table.');
return;
}
var data table.getRowData(index);
if (data == null) {
alert('Table is not in snapshot mode or invalid request.');
}
else {

var person=data.Website
var tpref "http://"

var url "http://" person;
window.open(url);
/// window.open(person);

}
}

It opens a URL from  a record selected in a TablePane. I think it opens the default browser (in my case Firefox).

Maybe this example helps you. (yes, the name of the variable [person] looks odd.)

For myself it works great

Great! Thank you Vladimir and Robert, I have got it working!

Thank you Julius, it works perfect!

I choose : do rec.OrgTypeSetObjectId($piece(line, ",", 2)) HI Robert, I have got it working now, and yes, the harder you struggle the bigger the victory when you succeed. And it is the charm of InterSystems Thanks Eduard, I will come back on you're recommendation for sure in short time, as I did not fully understood last time. Hi Robert, you are right, but I forgot to mention I got the error after adding Eduard his recommendation. This is the code: ClassMethod ImportCSV() { set adapter = ##class(%File).%New("C:\temp\in.csv") set status = adapter.%Open("R") if $$ISERR(status) { do System.Status.DisplayError(status) } set counter =1 while 'adapter.AtEnd { set line=adapter.ReadLine() set rec= ##class(CSVRecord).%New() set rec.ID=piece(line,";",1) set rec.FName=piece(line,";",2) set rec.Secname=piece(line,";",3) set rec.Gender=piece(line,";",4) set rec.Age=piece(line,";",5) write rec.ID, rec.FName, rec.Secname , rec.Gender, rec.Age,! Set savestatus=rec.%Save() if$$$ISERR(savestatus)
{
do $System.Status.DisplayError(status) } } //if error found during processing,show it if$ISERR(status)
{
do \$System.Status.DisplayError(status)
}
}

I do notice this topic comes back in time in the Community, so people are interested -and struggling with it like myself, but if we look back the items leave quite unanswered.... as people do not share their final working code... and only tell that they have solved the question.

Thanks!

Hi there,  tried the code sample above and got this:

Why?

Unfortunately the community & books are full with half code snippets rather than showing working full code samples>

Themelani, can you please share you're working code to the community? then the item is completed! Thanks!

I have recently (June 2018) bought the book,  unfortunately no download of samples available (which I particular was hoping for).

Hi Eric, last time I have resolved by just doing a new installation.

However last week (march 2018) I got the same issue on all 4 instances on my computer. No clue what have caused the issue.

According to the logfile I had to delete Cache.WIJ which I did. I also replaced cache.cpf with _last.good-.cpf and deleted Cache.ids as you have recommended.

After this I restarted the machine. No result however.

According to Windows services : the Webserver for Cache cannot be started.

I want to share this information. I do not have a licence for official support, but do want to continue development in Cache.

Thanks,