Solved

Agent that will copy field and parse it before pasting it

Posted on 2004-10-12
15
277 Views
Last Modified: 2013-12-18
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.companyname.com 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
0
Comment
Question by:padillrr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
15 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 12289938
Put this in your nab view action and select some documents and see this is what whether you required

      
      
      
      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(doc)
      Wend
0
 

Author Comment

by:padillrr
ID: 12290179
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
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12290215
Put this code in a agent, and call the agent from a view action, it will work

Partha
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Author Comment

by:padillrr
ID: 12290295
I created the agent and ran it against several documents nothing is happening, I'm running server and client 6.5
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12290325
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];"Fieldmodifier")

e. save the view action

f. select one document(for time being)      and click on this view action
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12290399
in the agent you have to paste the code of what i have given

Partha
0
 

Author Comment

by:padillrr
ID: 12290494
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
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 250 total points
ID: 12290518
Hi padillrr,

Creata formula agent with the following code:

SELECT @All;
FIELD $dspAltFullNameSort := @Left($dspInternetAddress; "@") + "@companyname.com";

Select a few docs and run the agent from the ACTIONS menu.

Cheers!
0
 

Author Comment

by:padillrr
ID: 12290649
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.....
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12290655
First of all do u have rights to change the document

Partha
0
 

Author Comment

by:padillrr
ID: 12290756
yes I have all rights, it is my test server, I can manually go in and change anything on the document and save it....
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12290824
I don't see anythign apart from access. Try setting a value in the agent like:

field test :="this is atest value";@success

Partha
0
 

Author Comment

by:padillrr
ID: 12290982
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.....
0
 

Author Comment

by:padillrr
ID: 12291281
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?
0
 
LVL 14

Assisted Solution

by:p_partha
p_partha earned 250 total points
ID: 12291424
Not at all a problem for me

Partha
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question