Dat swapping $ID for $V ?

Hi newbie question here I know,
so anyway I’m not a dat wiz yet,
but I’m working on it

table with Id and values as such

Id Value
q 0
w 0.04
e 0.08
r 0.12
t 0.16
y 0.2
u 0.24
i 0.28
o 0.32
p 0.36
a 0.4
s 0.44
d 0.48
f 0.52
g 0.56
h 0.6
j 0.64
k 0.68
l 0.72
z 0.76
x 0.8
c 0.84
v 0.88
b 0.92
n 0.96
m 1

what I’d like to happen is have text being generated in realtime,
coming into dats
and based on this table,
detect the incoming text id and swap the Id for the value

Here’s an example

text file being generated in realtime: qwertyzzz
Output I want: 0 0.04 0.08 0.12 0.16 0.2 0.76 0.76 0.76

any clues/help would really be appreciated
thanks
Jim

hey jim, here’s one way. You could directly set it up as columns instead of rows and therefore save the transpose DAT
lookup.toe (3.83 KB)

thanks Achim
works in one direction (the one I had in my example)
but doesn’t work in reverse (with slight tweaking) for me yet (numbers back to letters)
but it’s late at night
and I’ll need to take a little clear headed awake time to reverse engineer what you did here for me
If share with you the wackyness I create once I get er goin

get er done
ruff ruff

thanks again
jim

if you want it to work in reverse you need to introduce some kind of delimiter. Text is split by character, but your number values consist of multiple characters per item, so it fails. Let me know if you can’t figure it out.