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 ProblemSQLGridSelectedView Filter Problem
Previous
 
Next
New Post
7/18/2007 11:00 PM
 
Hi

I'm hopping Paul or someone else familiar with SQLGridSelectedView can help me out.

Using SQLGridSelectedView I have a query that displays data from the UserProfile table for several added fields.
My Query works just fine until I try using a filter.
The goal is to filter by "Grade".

Below is what I have tried. The grid shows up with all records just fine, when I try to use the filter I get the following error:
"Error on Primary Select: The multi-part identifier "UserProfile.PropertyValue" could not be bound."

Not sure if this has to do with the inner join, or maybe something in the clause.
Can you help me???


Thanks,
Robert


My Query (Run's fine by itself) ********************************
select DisplayName,
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 63) as [Child Last Name],
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 62) as [Child First Name],
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 44) as [Grade],
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 45) as [Sport],
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 82) as [2nd Child First Name],
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 87) as [2nd Grade],
(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 88) as [2nd Sport]
from users
inner join UserRoles on users.userid = userroles.userid
where userroles.RoleID = 1
ORDER by [Child Last Name], [Child First Name]

The Filter ***************************
Parm Name: Grade
Prompt: Select Grade
Select: Select Distinct PropertyValue as Grade from UserProfile where PropertyDefinitionID = 44
Clause: UserProfile.PropertyValue = '[Parm:Grade]'

Required: Yes
Allowed: Yes

 
New Post
7/19/2007 1:25 PM
 

Robert,

I believe that your Filter cause needs to be something like:

(Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 44) = '[Parm:Grade]'

To test this, add this clause to the working select and define a specific grade.  Should work. If so then add the parameterize version into SQLGridSelectedView.  Give it a try and let me know at SQLGridSelectedView [at] Tressleworks [dot] ca

Hope that helps,
Paul.

 

 
New Post
7/19/2007 2:05 PM
 
Hi Paul,

That worked great!!! Thanks for the help. I tried to email you at "sqlgridselectedview@tressleworks.ca" but got a delivery notification error. Is their another email address I can send to?

Since that was so easy... :-)

You up for a tougher one?

You saw in my query where I am pulling "Child First Name", "Grade", "Sport", and "2nd Child First Name", "2nd Grade", "2nd Sport".

Is there away to combine the columns and data?

"Child First Name" with "2nd Child First Name"
"Grade" with "2nd Grade"
"Sport" with "2nd Sport"

Again, Thanks for the prompt excellent reply.

Robert
 
New Post
7/20/2007 8:25 PM
 
Robert,
 
Your welcome...
 
As for combining the columns I am not sure what you have in mind, but you can combine the values as if they were strings. (varchar)
 
For example, if you have a table with two columns like FirstName and Lastname then you can display the contents as a single column by selecting something like...
 
Firstname + ' ' + Lastname as [Full Name], ...
 
If this is what you are looking for then use the '+' operator to combined the values.  Beware that you must combine like database types so you might need to cast (or convert) the values to varchar to make it work as you need.
 
Hope that helps.
Paul.
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...SQLGridSelectedView Filter ProblemSQLGridSelectedView Filter Problem


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