Forum Discussion
8 Replies
- viktor_nContributor II
Hi @dipanjan.pan,
I hope this will help you 🙂
SnapLogic_Community_2021_05_31.slp (7.2 KB)Regards.
- dipanjan_panNew Contributor
Thanks a lot @viktor_n …it works
- alchemizContributor III
Hi Dipanjan,
You can use the string method charCodeAt
e,g
($Column1.toLowerCase().charCodeAt(0) - 97) + 1
- alchemizContributor III
My bad, I thought column2 is base from the character from column1 🙂
- ptaylorEmployee
I’m not understanding your example. If Column 2 is supposed to be your rownum() value, why wouldn’t the values be 1, 2, 3, 4, 5 instead of 1, 1, 1, 2, 3?
- dipanjan_panNew Contributor
rownum based on some partition by column. In this case I want the output based on column 1. thats why it is 1,1,1,2,3
- ptaylorEmployee
Sorry, can you please explain more specifically what you mean by that? What is the partitioning rule?
- ptaylorEmployee
The expression
snap.in.totalCount
might be what you’re looking for, but I’m really not sure based on your example.