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

x
?
Solved

Multipe fields and email

Posted on 2004-03-24
15
Medium Priority
?
206 Views
Last Modified: 2013-12-18
Hi,
I have a situation where the I have a form which has 3 check box fields. THe first field has 3 options and the second has 10 and the third has 5.

Ex let field #1 has values I,B and C
and field #2 has CS,IS,PS,ZS,XS,TCP,TS,TSN,TO,TCP
Field #3 has LP,DL,E,EL,PE

Now i have a set of users who own a combination of the values as mentioned in the above 3 fields

I would like to send an email based on the selection. Since it is a multivlue field sometimes the combination could meet 2 users and hence have to send an email to both of them.

How do I check for the combination before emailing.


Thanks
Raj
0
Comment
Question by:Rajen
  • 8
  • 6
15 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10670943
Here is something you should be able to do..

Create a lookup document with the name of the person who owns the categories.

Create a view with combined /concatenated values of all 3 fields .

Then in the form concatenate the field values and then do a lookup on the view above which will return the names of the person matching the category and send mail to these persons

~Hemanth
0
 

Author Comment

by:Rajen
ID: 10671397
Hemant,
I have the follwoing 4 users and based on the field value I have provided the combination comes around 300. How can I check for this. Hope I am not missing something here.

Raj
0
 

Author Comment

by:Rajen
ID: 10671414
Hemant,
I have 4 users and based on the field value I have provided above, the combination each user owns comes around 300. How can I check for this.

Raj
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Rajen
ID: 10671433
I meant to say total combination is 300
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10671470
You have to design the lookup form with following fields

Name.. User Name field
Field1.. Multivalued field
Field2.. Multivalued field
Field3.. Multivalued field

Now for the user say Rajen..Enable

field #1 = I and B
field #2 = CS,IS,PS,ZS,XS,TCP,TS,TSN,TO,TCP
Field #3 = LP,DL

SO when you build the view with Field1 + Field2 + Field3 you will get all possible combinations. This should be in your I column and also enabel col property "Show multi values as seperate entries"

0
 

Author Comment

by:Rajen
ID: 10671793
It only combines in such a way ,showing seperate entry for the different first field values in the column formula. Say if I have 5 values in field one it shows only 5 combination and neglectng the multiple values in feild 2 and 3
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10671805
Or, might be simpler to reverse it.  Have a document that describes who the owner is for field1, value I
A doc for owners of field1, values S

etc.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10672224
You have to do a permuted addtition

FIELD1 *+ Field2 *+ Field3

0
 

Author Comment

by:Rajen
ID: 10678405
Hemant, I have the view and all the lookup done. For some reason my form where the user selects the check box does not return all value, but only the first from each field. Do I have to set up any properties. I have the filed as Checkbox with Multi value automatically selected and also used permuted addition while passing it to the lookup.
Raj
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10678643
uhm.. that is true it will return the first key value out of the list.. So there is little more work to do.

You have to adopt the script and use Recalc event to fetch the values

Create one more field effectively using the same permuted addition as indicated above to list all possible key to lookup. And in the script scan thru each key value and use getalldocumentsbykey to get the value of the recepients

1. Create field AllKeys .. computed,
FIELD1 *+ Field2 *+ Field3

2. The script in the recalc event

dim s as new notessession
dim db as NotesDatabase
dim doc as notesdocument, note as notesdocument
dim view as notesView
dim col as NotesDocumentCollection
dim temp(0) as String

set note = source.Document
set db = s.currentdatabase
set view = db.GetVIew( "VIEWWITHALLPOSSIBLEKEYS")
recipients = temp
forall k in note.AllKeys
set col = view.GetAllDocumentsByKey( k, true)
set doc = col.GetFirstDocument
while not doc is nothing
recipients = fulltrim(arrayappend(recipients, doc.Name))      ' The recipent name field .. replace it whatever you have it in the lookup doc
set doc = col.GetNextDocument(doc)
wend
End Forall
' Now set the recipients in the field
note.Recipients = recipients


This is a prototype and could be fine tuned later to your need
0
 

Author Comment

by:Rajen
ID: 10678836
I got it to work, but I am getting a lot of combinations, how will lookup handle this as a key
Raj
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10679093
What lookup ? DBLookup ?? It cannot that is the intent of providing LS code above
0
 

Author Comment

by:Rajen
ID: 10679640
Hemant,
The previous post was before I could see your recent comment since I did not refersh the page and had it opened since yesterday. Pls ignore it and everything seems to work great. The only problem I see is if I have it on the recalc event, it refreshes everytime when user goes to a field to select since I have some validation formula.

Raj
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 400 total points
ID: 10679797
Usually I suggest to validate fields during save instead of refresh... as it cut down the advantage of refresh !
0
 

Author Comment

by:Rajen
ID: 10680346
Hemant,
Thanks for all your help.

Raj
0

Featured Post

Industry Leaders: 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

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…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
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…

927 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