Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2002-03-12
24
Medium Priority
?
270 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 400 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
 

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

Independent Software Vendors: 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

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

876 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