In WebDirect I want to replace (or remove) some text in a text string. I know the standard script step is not compatible with WebDirect, but is there a work-around?
There is no standard "step" to replace text, just a standard function of that name (and there are other ways, too).
What exactly are you trying to do?
The scriptstep 'replace field content' (or similar, no english system here) will work - but without the dialog... You have to define a 'fixed' replace...
You can also have a script that loops through a found-set, altering the contents of a field using 'substitute'. This way, You could have global fields to be entered in a separate layout first, using them for 'substitute' (set field (MyField; substitute (MyField; SearchForVar; ReplaceWithVar))
If you want to use "Replace Field Contents", can use it without dialog using fixed expression and entered value at run time.
Or, do you want "Perform Find/Replace" step, this is always not compatible on WEBD?
But you said "in a text string", so seems not match.
Thanks for your help.
I solved it by putting | after each new item so the string looks like alpha| beta| gamma| etc.
Set a variable for the text string to be removed var item2 = $beta|
Then set variables with text calcs for position, length of each item, then used the replace function to remove the item from the text string.
Probably there is a more elegant way to do this but this works fine in WebDirect.
Retrieving data ...