Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...SQLGridSelectedView filter questionSQLGridSelectedView filter question
Previous
 
Next
New Post
3/9/2007 5:34 AM
 
Hi
I hope Paul, you can help on this issue.
I am using SQLGridSelectedView to display data from several contacts module. I use the query and parameters as shown below.
In this case I select the data based on those contacts modules ID's.
I can filter the records by the module ID (the  DDL works fine) since it is common for both contacts and modules tables but my problem is that if I want to filter the records by the module title it does not work. (the module ID is meaningless to the user)
I think it is because the title is only presented in the modules table.
Any idea how can I do it?
 
Thanks,
Yehuda
 
SELECT     Modules.ModuleTitle as commity, Contacts.Name AS Name, Contacts.Contact1 AS home Phone, Contacts.Contact2 AS Cell Phone, Contacts.Role AS Work Phone,
                      '<a href="mailto:' + Contacts.Email + '">Send Email</a>' AS email
FROM         Modules INNER JOIN
                      Contacts ON Contacts.ModuleID = Modules.ModuleID
WHERE     ((contacts.ModuleID = 607) or (contacts.ModuleID = 611) or (contacts.ModuleID = 613) or (contacts.ModuleID = 615) or (contacts.ModuleID = 617) or (contacts.ModuleID = 619) or (contacts.ModuleID = 621) or (contacts.ModuleID = 623) or (contacts.ModuleID = 626)  or (contacts.ModuleID = 629) or (contacts.ModuleID = 644))
ORDER BY modules.moduletitle
------------------------------------------------------------------------------------------------------------------------------------
The filter by moduleID is:
 
Parm Name:  moduleid
Prompt:    
Select:  SELECT DISTINCT ModuleID FROM Contacts WHERE     ((contacts.ModuleID = 607) OR (contacts.ModuleID = 611) OR (contacts.ModuleID = 613) OR (contacts.ModuleID = 615) OR (contacts.ModuleID = 617) OR (contacts.ModuleID = 619) OR (contacts.ModuleID = 621) OR (contacts.ModuleID = 623) OR (contacts.ModuleID = 626) OR (contacts.ModuleID = 629) OR             (contacts.ModuleID = 644))
Clause:  Contacts.ModuleID= [Parm:ModuleID]

Yehuda Tiram
AtarimTR
AtarimTR
972-2-5700114   |   972-54-4525492   |    http://www.atarimtr.co.il
 
New Post
3/9/2007 9:12 AM
 
Torosin,

Try this (you'll need to substitute your moduleID numbers);

Query:

SELECT     Modules.ModuleTitle as commity, Contacts.Name AS Name, Contacts.Contact1 AS [Home Phone],
Contacts.Contact2 AS [Cell Phone], Contacts.Role AS [Work Phone],
'<a href="mailto:' + Contacts.Email + '">Send Email</a>' AS email
FROM         Modules INNER JOIN
Contacts ON Contacts.ModuleID = Modules.ModuleID
WHERE     ((contacts.ModuleID = 456) or (contacts.ModuleID = 470) or
(contacts.ModuleID = 469) or (contacts.ModuleID = 473) or (contacts.ModuleID = 870)
or (contacts.ModuleID = 619) or (contacts.ModuleID = 471))
ORDER BY modules.moduletitle

<!---------->
Filter:
Parm Name: ModuleTitle
Select:

SELECT DISTINCT Modules.ModuleTitle
FROM         Contacts INNER JOIN
                      Modules ON Contacts.ModuleID = Modules.ModuleID
WHERE     (Contacts.ModuleID = 456) OR
                      (Contacts.ModuleID = 470) OR
                      (Contacts.ModuleID = 469) OR
                      (Contacts.ModuleID = 473) OR
                      (Contacts.ModuleID = 870) OR
                      (Contacts.ModuleID = 619) OR
                      (Contacts.ModuleID = 471)

Clause: Modules.ModuleTitle= [Parm:ModuleTitle]

HTH


 
New Post
3/9/2007 10:42 AM
 

SQLGridSelectedView will support the selecting two items in the fitler select where the you can supply a title, and the module id.  Check out the example on the bottom of page 19 of the User Guide ..  This example is shows a similar type of filter where the text is displayed, but the ID is used in the Filter clause.

Hope this helps
Paul.

 
New Post
3/10/2007 2:22 PM
 

Hi cjsmitty,

Thanks for your reply. Using your suggesstion resulted in sql error.

Please see my reply to Paul's reply.

Thanks,

Torsin.


Yehuda Tiram
AtarimTR
AtarimTR
972-2-5700114   |   972-54-4525492   |    http://www.atarimtr.co.il
 
New Post
3/10/2007 2:25 PM
 

Hi Paul,

Thanks for directing me to the guide. It did the trick.

I should have read that through before asking.

Any way, it is a great feature in this great module.

Thanks,

Torosin


Yehuda Tiram
AtarimTR
AtarimTR
972-2-5700114   |   972-54-4525492   |    http://www.atarimtr.co.il
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...SQLGridSelectedView filter questionSQLGridSelectedView filter question


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out