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 questionsSqlGridSelectedView questions
Previous
 
Next
New Post
3/29/2007 4:17 AM
 

sir paul or anybody, could you please help me with several questions:

1. SqlGridSelectedView works fine in querying the database and displaying the records. what really bothers me is that, you have to enter the statement manually on the module. WHAT IF (actually this is what I really need), I need to change the select statement dynamically, showing records of a certain employee that is logged in???

example: I log in as hapidose, then I click on a page 'summary' that has the sqlgridselectedview module. I would like to see my quiz scores, quiz dates and others with my employee number 1111. It should display ONLY MY RECORDS. and when another employee logs in, say, paul, he should see his own records. so how can I go about with this using the module???

2. This also goes out to updating records...

Thanks so much sirs/madams, I hope you could help a newbie with this. THANKS!!!

 
New Post
3/29/2007 4:49 PM
 

I have actually done this with SQLGridSelectedView.  You need to pass parameters in your link and use [Query:parmname] to get the value. Where parmname is the name of the parameter you are sending.  the following is an example where I pull a faculty member's course list based on employee username in DNN  in this case I use the available parameter [DNN:UserID] to pull the userid and have a join table called facultyinfo that joins the dnn id to my info system id for the faculty.:

SELECT     tm_dnn_coursesview.Course, tm_dnn_coursesview.Section, tm_dnn_coursesview.Title, tm_dnn_coursesview.Day,
                      tm_dnn_coursesview.Time, tm_dnn_coursesview.Building, tm_dnn_coursesview.Room, 
                      tm_dnn_coursesview.[Max Size], tm_dnn_coursesview.Enrl, tm_dnn_coursesview.[Seats Avail.], tm_dnn_coursesview.wait_list
FROM         tm_dnn_coursesview INNER JOIN
                      FacultyInfo ON tm_dnn_coursesview.people_id = FacultyInfo.People_ID INNER JOIN
                      TOM_CurrentYearTerm ON tm_dnn_coursesview.year = TOM_CurrentYearTerm.Year AND
                      tm_dnn_coursesview.term = TOM_CurrentYearTerm.Term
WHERE     (FacultyInfo.DNN_ID = '[DNN:UserID]')

 
New Post
3/29/2007 5:30 PM
 
Why not just use the built in token '[DNN:UserID]'? I use this and the role token '[DNN:Roles]'. i.e.Where user 'IS IN [DNN:Roles]'

Both of these are covered in the User manual (p.33).


 
New Post
3/29/2007 8:07 PM
 

 I must admit this is somewhat interesting to see the user community answer questions before I even get a chance to speak up.  Many thanks to all.

Paul.

 
New Post
3/29/2007 11:52 PM
 

this is really great! even if still don't grasp the idea, atleast i know that this is possible, whew! thank you so much to both of you who took time to answer my question, I will get to this very shortly and I will update you guys if I will be able to pull it of. again, many thanks to you guys and I am very happy because in my work, nobody helps me with this because I'm the only developer. thank you very much for the knowledge, you shall be rewarded by the greater entity one way or another. =P

 

sir paul, you must be proud of these small things, people trying to contribute and spreading out the goodness of your work, again many thanks! more power to you and your endeavors.

 

I'll get back to you guys for updates!

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...SqlGridSelectedView questionsSqlGridSelectedView questions


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