I want to do something I consider quite simple, but frustratingly can’t get it to work.I want a Picklist or Names.nsf dialogue to appear, the user selects the names, and all the selected documents are updated with the name they select. As the field will be emailed from and also for tidniness sake, I want the format of name giving the persons name and the abbreviate part of the CN=…
I have two agents, the first is here, runs on selection formula of ‘none’:-
FIELD DocumentOwner := DocumentOwner;
changeField := DocumentOwner;
tperson := @PickList([Name]:[Single]);
tperson1 := @Name([CN];tperson);
tperson2 := @Name([Canonicalize];tperson1 +“/”);
tperson3 := @Name([Abbreviate];tperson2);
newValue := tperson3;
@SetEnvironment(“changeField”;changeField);
@SetEnvironment(“newValue”;newValue);
@Command([ToolsRunMacro];“SetField”);
@All
So, we have displayed ONE picklist, the user has selected a name from it, we translate the name to a certain format, then set the @SetEnvironment values so we can use this value in the next agent, which runs on selected documents:-
FIELD DocumentOwner := DocumentOwner;
changeField := @Environment(“changeField”);
newValue := @Environment(“newValue”);
@SetField(changeField; newValue);
SELECT @All
The idea is then that all the documents are updated, the user is only displayed the one picklist.
The selection seems to be working. But the documents DO NOT get set to the new values…
Any ideas? Probably something quite small I’m missing, just need a reminder of whatever it is…
Thanks everyone.