Hi,
i am looking for a node to encode customer numbers:
example:
Customer number oringinal:
1234567890
Customer number encoded: Logic:(1=2; 2=3; 3=4;4=5;5=6;7=8;8=9;9=0;0=1)
2345678901
Hope someone could help me. Thanks regards Chris
Hi,
i am looking for a node to encode customer numbers:
example:
Customer number oringinal:
1234567890
Customer number encoded: Logic:(1=2; 2=3; 3=4;4=5;5=6;7=8;8=9;9=0;0=1)
2345678901
Hope someone could help me. Thanks regards Chris
Hi Chris,
I would take a Java Snippet with (quick & dirty)β¦
int i = 1234567890;
String is = Integer.toString(i);
ArrayList a = new ArrayList<>(10);
a.add(β1β);
a.add(β2β);
a.add(β3β);
a.add(β4β);
a.add(β5β);
a.add(β6β);
a.add(β7β);
a.add(β8β);
a.add(β9β);
ArrayList b = new ArrayList<>(10);
b.add(β1β);
b.add(β2β);
b.add(β3β);
b.add(β4β);
b.add(β5β);
b.add(β6β);
b.add(β7β);
b.add(β8β);
b.add(β9β);
b.add(β0β);
String js = ββ;
for(int n=0;n<is.length();n++) {
js += b.get(a.indexOf(is.substring(n, n+1)));
}
Input would be a String, then start with βisβ above, or an Integer, then βiβ.
Output js as a String.
Greetz, Tommy
Hi there @Chris87 ,
I would go scripting as well in this case - Java, Python or JavaScript. Everything else seems too complicatedβ¦
Br,
Ivan
Hi,
Nice one @HansS but would take different approach. After Cell Splitter go with transpose node and Cell Replacer which will actually do the encoding. Then transpose and combine columns back. And of course there is one loop iteration per row
Br,
Ivan
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.