Hi Darshan,
 
You can sort the table field data on Email and SMS and then you can do 2
things:
 
1) Check every time in table looping ,Is previous value of email field of
Table  equal to the current value of email field of table. If not same then
only append this value to Email field.
2) Another thing you can do by checking the Current table record (e.g. email
for Request ID 2) is the part of the Current value of Email field (which
your want for Sending notifications) or not ? I mean to say check whether it
is substr of Email or not by Direct Sql option. If it is not part of Current
Email then only append value in Email field.
 
Regards,
Tarun
 

  _____  

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Darshana Jivan [MTN Network
Solutions]
Sent: Thursday, December 14, 2006 1:17 PM
To: [email protected]
Subject: Distinct result set on a table field


** 

Hi,

 

I have a View form "Contacts" that reads from an underlying table from
another schema in the database. I have a Table Field on a form "Notify" that
displays the Contact information. I then loop through the table to get the
sms/email values and set it as a delimited string. This is where I am having
a problem; the contact can be associated to many branches and therefore the
contact information will be duplicated many times. I need to be able to do a
Distinct or and extract to be able to get the distinctive value, or else the
contact would be notified one to many times depending on how many branches
they are associated with.  

 

Eg. 

 

Notify

 


 Request Id

First Name

Last Name

Email

SMS

Client ID

Branch ID


1

Mark

Brindley

[EMAIL PROTECTED]

2783452012

3

123


2

Mark

Brindley

[EMAIL PROTECTED]

2783452012

3

456


3

Jakos

Smith

[EMAIL PROTECTED]

2783656565

10

963


4

Jacques

Vermeulen

[EMAIL PROTECTED]

2701010233

20

321


5

Jacques

Vermeulen

[EMAIL PROTECTED]

2701010233

20

654


6

Jacques

Vermeulen

[EMAIL PROTECTED]

2701010233

20

987

 

Temp field that gets set 

 

Email

; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]

 

 

SMS

; 2783452012; 2783452012; 2783656565; 2701010233; 2701010233; 2701010233

 

I need to get a distinct email and sms value to send a notification to the
relevant contacts.

 

Any suggestions?

 

 

Regards,

Darshana Jivan

MTN Network Solutions

 

__20060125_______________________This posting was submitted with HTML in
it___ 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to