How to modify a table with if statement?

Hello,
I have a total beginner question : can you help me do this simple operation inside a DAT with a row of 8 values ?
I would like to modify each value like this :
If val == 0 then replace by 1
If val == 1 then replace by 2
If val == 2 then replace by 5

Should I use an eval DAT and an expression to do this?
Should I use a table or a script DAT for the expression and what is the code for the expression ?

Thank you :pray:

depending on how dynamic / scalable you need this there are a few ways you can go, but the easiest / simplest is to use a series of substitute dats in line, to do your find / replace.

This has some limitations with certain strings and other edge cases, but might be a good place to start!

1 Like

Thank you very much Lucasm, that works perfect!!

1 Like