Ray Padilla
asked on
Agent that will copy field and parse it before pasting it
Hello Experts,
Here's what I'm looking for, I need an agent that will copy the Internet address ($dspInternetAddress) on the NAB into the phonetic name field ($dspAltFullNameSort) on the NAB, however currently the address looks like this firstname.lastname@nnn.com panyname.c om the nnn needs to go away leaving firstname.lastname@company name.com. Either it needs to be parsed out of the original email address or maybe just copy the firstname.lastname@ and add the companyname.com which ever is quickest and cleanest. All your help is appreciated and as usual I have to have this completed by Thursday 1pm, sorry to all I am not a developer and can use all the help you can provide me. Thanks
Here's what I'm looking for, I need an agent that will copy the Internet address ($dspInternetAddress) on the NAB into the phonetic name field ($dspAltFullNameSort) on the NAB, however currently the address looks like this firstname.lastname@nnn.com
ASKER
where exactly does this go? I tried it as an action button on a view and it doesn't work, I'm looking for an agent preferably
Put this code in a agent, and call the agent from a view action, it will work
Partha
Partha
ASKER
I created the agent and ran it against several documents nothing is happening, I'm running server and client 6.5
step by step of what you have to do
a. create a agent and name it as Fieldmodifier
b. set the agent to run on selected documents
c. go to the view where you need to change the field vlaue
d. create a view action . and give this formula
@command([toolsrunmacro];" Fieldmodif ier")
e. save the view action
f. select one document(for time being) and click on this view action
a. create a agent and name it as Fieldmodifier
b. set the agent to run on selected documents
c. go to the view where you need to change the field vlaue
d. create a view action . and give this formula
@command([toolsrunmacro];"
e. save the view action
f. select one document(for time being) and click on this view action
in the agent you have to paste the code of what i have given
Partha
Partha
ASKER
Hi Partha,
I've followed your instructions to the letter, created the agent, added the action to the view and selected a document and ran it, but the phonetic name field is not being populated
I've followed your instructions to the letter, created the agent, added the action to the view and selected a document and ran it, but the phonetic name field is not being populated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well I've tried them both I like the simplicity of the formula but neither is working, can I be doing something wrong? I tried the LS agent and action button as per instructions with no results the formula agent seems to run but shows no results, I don't see where the form is being put into an edit mode in order to add this information....by the way Thanks for your help, I'm really in need of this.....
First of all do u have rights to change the document
Partha
Partha
ASKER
yes I have all rights, it is my test server, I can manually go in and change anything on the document and save it....
I don't see anythign apart from access. Try setting a value in the agent like:
field test :="this is atest value";@success
Partha
field test :="this is atest value";@success
Partha
ASKER
Partha, I tried the value with no success, I can tell the agent runs, but the results continue to be a blank field under the phonetic name field.....
ASKER
Hi All, I figured it out, sorry may have been my error on this I used the formula:
SELECT @All;
FIELD $dspAltFullNameSort := @Left($dspInternetAddress; "@") + "@companyname.com";
but deleted the $dsp and it worked....I appreciate the help and will still award the points, but to be fair I will split them between both, is that OK?
SELECT @All;
FIELD $dspAltFullNameSort := @Left($dspInternetAddress;
but deleted the $dsp and it worked....I appreciate the help and will still award the points, but to be fair I will split them between both, is that OK?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim session As New notessession
Dim db As notesdatabase
Set db = session.currentdatabase
Set doccoll = db.unprocesseddocuments
Set doc = doccoll.getfirstdocument
While Not doc Is Nothing
sval = doc.~$dspInternetAddress(0
svalafter = Strright(Strright(sval,"@"
svalbefore = Strleft(sval,"@")
doc.~$dspAltFullNameSort = svalbefore +"@" + svalafter
doc.save True, True
Set doc = doccoll.getnextdocument(do
Wend