Solved

Dependant upon who is filling out form, mailsend to...

Posted on 2002-03-12
24
247 Views
Last Modified: 2013-12-18
We have a form, FoodShow Registration
The form is to be completed by the salesreps for all of their customers who will be attending our foodshow

The SalesRep field is an author's field

Dependant upon the SalesRep, we want the form sent to their respective Sales Manager....
Division A, SanDiego, SalesRep Bob, completes form, automatically mails to Big Bob, the SanDiego Salesmanager

Division B, Chicago, SalesRep Jim, completes the form for his customer, automatically on Save and Send, mails the completed form to Jumbo Jim, the Chicago Salesmanager

currently the salesrep selects their sales manager from the company address book, but we want to make it even simpler for them.....

any suggestions?
0
Comment
Question by:Paulette
  • 11
  • 4
  • 4
  • +2
24 Comments
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6857552
You have two options :
1) Add the sales manager to the manager field of the public name and address book (or the domino directory as it is called nowadays) and lookup the name of the sales manager from there.
2) Create a form to hold two names fields : sales person and sales manager. Then create a view, sorted on sales person containing only these documents and lookup the sales manager's name from this view.

I'd go for the first solution if possible, since this is the easiest. (You do however need to have users that are disciplined enough to leave this field alone and you need to be able to modify the fields for all concerned users to enter the sales manager).

The formula for the sales manager field would then look something like this, supposing the domino directory is on the same server as the current database :

@DbLookup(NoCache; "":"names.nsf"; "($Users)"; @UserName; "Manager");

This function will perform a lookup of the current user's name in the domino directory and return the contents of the field "Manager". This field is a names field, that can be filled out on the Work/Home tab of the person document of the user.

If you need any further info, let us know.

JM
0
 

Author Comment

by:Paulette
ID: 6857658
Jerrith


I am trying to follow the 'easy' way and have done this ...

In the NAB added the manager name to the work/home tab for three of my reps <to test>

On the form, added a hidden field, SalesMgr...hidden in all instances of use....computed

When I try to preview my form now, get the error

'entry not found in index or view's index not built yet'

Do I need to create a view as well?


0
 

Author Comment

by:Paulette
ID: 6857672
Jerrith


I am trying to follow the 'easy' way and have done this ...

In the NAB added the manager name to the work/home tab for three of my reps <to test>

On the form, added a hidden field, SalesMgr...hidden in all instances of use....computed

When I try to preview my form now, get the error

'entry not found in index or view's index not built yet'

Do I need to create a view as well?


0
 

Author Comment

by:Paulette
ID: 6857837
Jerrith


I am trying to follow the 'easy' way and have done this ...

In the NAB added the manager name to the work/home tab for three of my reps <to test>

On the form, added a hidden field, SalesMgr...hidden in all instances of use....computed

When I try to preview my form now, get the error

'entry not found in index or view's index not built yet'

Do I need to create a view as well?


0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6857872
It is your dblookup which is not finding the key.

For Person "Bob" there should be same value on the First sorted column in the view that you are referencing in the dblookup.

Get the field value "Manager" in the lookup.

Also the view that is being lookedup should be sorted on First column.
0
 

Author Comment

by:Paulette
ID: 6857923
Well, after playing with it a bit more, I decided that since it was looking into names.nsf (which on the server is the Public address book, where on local it is my personal address book)..I changed it to look to my local copy of the server address book (for testing)  now I don't get the error..yeah  BUT <isn't there always a but in my questions?>

I have the field hidden, yet the resulting value <manager's name> shows on the form...how do I hide the result as well?

And then, moving on to my desired result, how do I make it send a mail message to that manager when they save and close the form?  

thanks in advance again :)
0
 

Author Comment

by:Paulette
ID: 6858163
Well, after playing with it a bit more, I decided that since it was looking into names.nsf (which on the server is the Public address book, where on local it is my personal address book)..I changed it to look to my local copy of the server address book (for testing)  now I don't get the error..yeah  BUT <isn't there always a but in my questions?>

I have the field hidden, yet the resulting value <manager's name> shows on the form...how do I hide the result as well?

And then, moving on to my desired result, how do I make it send a mail message to that manager when they save and close the form?  

thanks in advance again :)
0
 
LVL 10

Accepted Solution

by:
zvonko earned 100 total points
ID: 6858195
Hello Paulette,

instead using this:
@DbLookup(NoCache; "":"names.nsf"; "($Users)"; @UserName; "Manager");

try that:
@NameLookup([EXHAUSTIVE];@UserName; "Manager");

Place this formula into a field named: Manager
Make this field: ComputedWhenComposed

Place into QuerySave event this formuls:
@If(@IsNewDoc;@MailSend(Manager;"";"";"Follow this link";"";"";[IncludeDocLink]);"")


Good luck,
zvonko
0
 

Author Comment

by:Paulette
ID: 6858234
My Manager field is computed when composed / text

The value is
@NameLookup([EXHAUSTIVE];@UserName; "Manager");

Where do I put the querysave event?  Where do I define that?  I cannot find it, in help it says it says it occurs during the SAVE operation, but I can't find it on any of my saves....

0
 
LVL 10

Expert Comment

by:zvonko
ID: 6858284
click on a part of the form where no field are.
When clicked there, you will see left side to formula definition window an explorer window with a list of attributes for the form itself.
First attribute in the list is: WindowTitle
Scroll down, and you will find: QuerySave

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6858329
Create a field Called MailOptions (ComputedForDisplay) and set the value to "1"
Create one more field Called SendTo (ComputedForDisplay) which will refer to Manager field value

So on every save the notes will send the mail
0
 

Author Comment

by:Paulette
ID: 6858330
My Manager field is computed when composed / text

The value is
@NameLookup([EXHAUSTIVE];@UserName; "Manager");

Where do I put the querysave event?  Where do I define that?  I cannot find it, in help it says it says it occurs during the SAVE operation, but I can't find it on any of my saves....

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Paulette
ID: 6858337
My Manager field is computed when composed / text

The value is
@NameLookup([EXHAUSTIVE];@UserName; "Manager");

Where do I put the querysave event?  Where do I define that?  I cannot find it, in help it says it says it occurs during the SAVE operation, but I can't find it on any of my saves....

0
 

Author Comment

by:Paulette
ID: 6858386
My Manager field is computed when composed / text

The value is
@NameLookup([EXHAUSTIVE];@UserName; "Manager");

Where do I put the querysave event?  Where do I define that?  I cannot find it, in help it says it says it occurs during the SAVE operation, but I can't find it on any of my saves....

0
 

Author Comment

by:Paulette
ID: 6858445
Whew, almost there thanks to all of you again

But I do have one last question on this one

I have added the specific manager to each reps Address Book entry....
Have followed Hemantha's suggestion...

Put the formula
@NameLookup([Exhaustive];   @UserName ; "Manager")
Behind the hidden Manager field

Put the formula
@If(@IsNewDoc;@MailSend(Manager;"";"";"Food Show Registration:  Follow this link";"";"";[IncludeDoclink]);"")

in the querysave

The only problem I am having, and I don't know why is that each time I click on Send, it doesn't just send the message to the designated recipient, it questions the name (no match found for name, brings up a dialog list INCLUDING the name in question....) is there a way round this?

thanks so much, a million thanks
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6859066
Include O and OU in defining the manager name (ie. fully qualified name, eg: Manager/Sales/US) in the person document.

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6859822
Yes that would be it. Make sure the full distinguished name is available in the Manager field of the person document and it should work like a charm.

Cool function that @NameLookup thing, zvonko. I guess I'll have to study the formula's in my applicaton guide to see if there's other cool formula's like that ;-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6859893
<|:-)
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6860126
JM, I experienced some coolest @Functions in RNext.  Like printing to the status bar, looping functions WOW !!! I no more need to go for scripts anymore for a notes app !

The entire DECS is not available as a property tab in RNext thats another coolest thing i saw.

I could not check the mobile interface yet.  Has anyone tried it ?

;-)

But....no application is yet developed by me or my company yet with RNext.  They are just running a test server even now...
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6860129
Well, you can't expect people to run applications on an environment that's not officially released, yet. :-)
0
 

Author Comment

by:Paulette
ID: 6877655
worked wonderfully :)

thanks experts again
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6877689
you are welcome ;-)


I'll give a round of cyber-beer for my expert buddies :-)

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6878435
yum yum yum....



0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6879262
Burps, thanks zvonko :-)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now