I'd love some ideas about how I should implement a key part of a project I am working on. Essentially it is data mapping, where I copy field x and put it into field y. However, there needs to be some ability to dynamically change (using string manipulation) that value during the transition.
What I would like is a textbox where a user could enter script allowing them to modify that value using a scripting language, ideally VBScript. That would then allow them to do simple manipulations such this example, which would take a substring:
Mid({input_value}, 2, 4)
Where
{input_value}
Would be replaced by the actual value at runtime.
So, for example, if the input from "field x" was "This is a test" and they used the above example of start = 2 and length = 4, the value saved into "field y" would be "his "
I know how I could run VBScript from C# as a scipt, that's not a problem. However, Is it possible to run and evaluate srcipts such as above at runtime and record the output back into a C# variable?
Otherwise, does anyone have any suggestions about how I could approach this?
Many thanks