tashsmith
asked on
Agent using formula to simply find and replace from list on multiple docs
Hi guys,
I have a categorised view
I want to allow users to select some docs and find and replace values in a field.
the field is a list and may contain one or more values.
so
select one or more documents
hit action button
presented with list, lookup from view in same database
select one or cancel
presented with a 'change to' pop up string box
make change
do not allo more than 10 documents at one time (if possible)
do not present box for each document
I have so far this
FIELD AFIELD:= AFIELD;
list:=@Prompt([OkCancelLis tMult] ; "Select "; "choose" ; "" ; LOOKUP FROM VIEW; "" );
choice:=ALLOW USER TO TYPE;
x := AFIELD;
y := @Replace(x; list;choice);
z := @Trim(y);
@SetField("AFIELD"; z);
SELECT @All
I have a categorised view
I want to allow users to select some docs and find and replace values in a field.
the field is a list and may contain one or more values.
so
select one or more documents
hit action button
presented with list, lookup from view in same database
select one or cancel
presented with a 'change to' pop up string box
make change
do not allo more than 10 documents at one time (if possible)
do not present box for each document
I have so far this
FIELD AFIELD:= AFIELD;
list:=@Prompt([OkCancelLis
choice:=ALLOW USER TO TYPE;
x := AFIELD;
y := @Replace(x; list;choice);
z := @Trim(y);
@SetField("AFIELD"; z);
SELECT @All
Try this.
Create new action on your categorized view, choose Lotus Script, go to Options section of the action's code, right click and choose Import, select the file codeEE.txt, choose yes if prompted to replace existing code...
Haven't tested it, post away if something is wrong...
Hope this helps,
mb¤
codeEE.txt
Create new action on your categorized view, choose Lotus Script, go to Options section of the action's code, right click and choose Import, select the file codeEE.txt, choose yes if prompted to replace existing code...
Haven't tested it, post away if something is wrong...
Hope this helps,
mb¤
codeEE.txt
ASKER
Hi guys,
Thanks for that, gotta run, will test and post back tomorrow:-)
Thanks for that, gotta run, will test and post back tomorrow:-)
ASKER
Hi mbonaci:
I have tried your solution first as it appears to cater for more of my requirements, thanks.
On running the agent, nothing seems to be happening.
I have replaced the field and view names as requested in the markup.
There is no prompts and when the debugger is running it isnt evoking or stepping throuhg anything?
I have tried your solution first as it appears to cater for more of my requirements, thanks.
On running the agent, nothing seems to be happening.
I have replaced the field and view names as requested in the markup.
There is no prompts and when the debugger is running it isnt evoking or stepping throuhg anything?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This works perfectly, and the instructions were concise, accurate and easy to follow.
Thanks very much
Thanks very much
Did I get it right, you want to get keyword list from view lookup and then let user to replace some of the values?
In this case, multi selection is not the best option, of course, option "OkCancelList" should be better. Unless you need to replace multiple choices with one.
Then we must clear resulting list from duplicate values using @Unique.
Agent target should be "All selected documents".
You can simplify code, specifying just:
Open in new window