Help with custom function

Help with custom function

Hi all,

I'm not a coder and need some help to create a script.

I'm using ZOHO FLOW to integrate two apps and need to build a custom function to convert values from a previous step (a webhook) to the next step.

The previous step is displaying field NAMEs and I need to convert it to the field ID, that is what the app (in the next step) requires.

In other words...

The previous step field can have values like A,B,C,D,E.
I need to convert any ocorrence of these values, like: A to 1, B to 2, C to 3, D to 4 and E to 5, and so on...

Example...

Let's say that the previous step field have the the values B,C,E -> I need to transform it to 2,3,5.

Is there a simple code that does just that?

Thanks!!