Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
row1 refers to the output arrow connecting your components and my understanding is that after that step or your work flow is complete, the variable isn't in 'scope' any longer so you can't access it. You may need to use the row name for the current step your on, or if you need to access data specific to a previous step, write it out to a file to re-use later.
Hello andy,
if I understand you right that you call a custom routine / class in tJavaFlex and try to get access to row1?
In this case I would say you have to pass the data with the method call (or constructor of your class, ...).
If I did not understand you: Can you please give us (me) a short screen shoot? Or give us some more information / examples?
Bye
Volker
public String setName(String name) {
// make some transformation to name
return name;
}
For me it is not clear what you would like to archive.
setName is a function of a class which has no effect.
If you would like to set the name you can just write: row1.Name= "john";
If you would like to make same additional transformation in your routine you can use the following code:public String setName(String name) {
// make some transformation to name
return name;
}
But in tJavaFlex you have to write again: row1.Name= s.setName("john");
If you would like to use the row itself in your function you need access to the RowStruct (your signature should be: public RowStruct setName(RowStruct row1)). But this does not work because RowStruct is defined as a private inner class. Possibly you can write a wrapper but this is, depending on your needs, too much work I think.
Bye
Volker
For me it is not clear what you would like to archive.
setName is a function of a class which has no effect.
If you would like to set the name you can just write: row1.Name= "john";
If you would like to make same additional transformation in your routine you can use the following code:public String setName(String name) {
// make some transformation to name
return name;
}
But in tJavaFlex you have to write again: row1.Name= s.setName("john");
If you would like to use the row itself in your function you need access to the RowStruct (your signature should be: public RowStruct setName(RowStruct row1)). But this does not work because RowStruct is defined as a private inner class. Possibly you can write a wrapper but this is, depending on your needs, too much work I think.
Bye
Volker
Possibly you can write a wrapper but this is, depending on your needs, too much work I think.
// your own class
public class MyOwnRow {
private String name;
public MyOwnRow(String name) {
this.name= name;
}
public setName(String name) {
this.name= name;
}
public getName() {
return this.name;
}
}
// in tJavaFlex
private MyOwnRow myRow= new MyOwnRow(row1.name);
// now you can use the following for example:
myRow.setName("john");
// and after all you have to go back to row1:
row1.name= myRow.getname();
I want the code that I will right in the tjavaflex to be generic and work for any number and types of attributes. This is why I dont want to write in it row1.Name because it will be to specific to this case. So, For that code to be generic, ...