Recently Viewed...
To help you navigate to pages you most recently visited, select from the links below.
Product Forums
Newsletter
Sharepoint Forums
Dynamic Forms Demonstrations
Page Tags
DNN Modules
SnowCovered Top Sellers

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

Live Content uses Web 2.0 approach to provide a Rich User Interface and streamlines content presentation by overlaying content on current page. Overlay images, videos, audio, text/html content, flash, dotnetnuke modules, and external content. Experience the demo...

Version 5 of the perennial best-selling tool for creating data-based solutions in DNN without custom programming. This version focuses on greater flexibility, expandability, and ease-of-use.

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

Gloss is the first ALL COLORS! skin, featuring a powerful XML-based flash and being 100% W3C CSS XHMTL1.0 compliant. Tune it yourself on the fly, changing colors, backgrounds, containers, text color and size, width and more! Brilliant!Available for DNN4 and DNN5

The award winning discussion forum and community solution for DotNetNuke is now even better. When you need to build the best community site, you need the best module, Active Forums!

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

Edit documents directly on your server. The premier document management solution for DotNetNuke (DNN). Index contents of documents. Share documents across your portal and avoid duplicates. Revised and flexible UI. Extensible architecture.

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

    |   Register   |   Thursday, January 08, 2009   
Data Springs Product Forums...
Subject: Suggestions for new Select Statement
Prev Next
You are not authorized to post a reply.

Author Messages
Gary
Posts:15
wading in the water
wading in the water

09/20/2006 10:58 AM  

Hi,

  I was looking over your stored procs and I see there is a way to pull responses by userid (with questionid) or by just question id.

 

I would like to suggests new option for an upcoming release.

 

I am trying to pull some of the dynamic profile data (not attached to the core fields) and I don't want to hard code the question id, since I will be testing on my dev server and don't want to have to change my module code when moving to the live site since the Question ID will be different.

 

So, I have writting my own SQL pull, which gets data based on the user id and the "shortfieldname" of the question.

Personally I think this should be included with your module.

 

Here is my example:

"select Q.DynamicQuestionID, Q.Question, R.Response from dbo.DynamicRegistration_Question AS Q

left outer join dbo.DynamicRegistration_QuestionResponse AS R

ON Q.DynamicQuestionID = R.DynamicQuestionID

where Q.ShortFieldName = 'Title' and R.UserID = 3 And R.InActive=0"

 

Just a thought though, obviously you can ignore it :-)

 

Thanks!

Gary

Chad
Posts:2386
river guide
river guide

09/20/2006 11:26 AM  

Hi. Well if you are needing custom results you might just try and our Dynamic User Directory w/ Search (also used as report generator/creator based on the Dynamic Registration Responses). The new version includes the ability to add a filter, also add as many dynamic search fields as you want for the user-facing side. You can check out the forum under Dynamic User Directory for more ways how to utilize the module and we also have a demonstrate on the product page.

Another sugestion might be to create Dynamic SQL Events that add to your own tables.

If these two options still do not work because you need something for another specific reason I would suggest creating another stored procedure (yours would work on short field name too but this would work as it is). Here is a procedure that is used to create a temporary table with each column name represents each question name for every user. This will get ever users response to every question.

CREATE PROCEDURE GetDataSprings_DynamicRegistration_UserRespones
@ModuleId int,
@PortalID int
AS

CREATE TABLE #MyQuestions(DynamicID uniqueidentifier, ID int identity)

-- Fill the temporary table with an ordered list from
-- the source base table

INSERT INTO #MyQuestions (DynamicID)
SELECT dynamicquestionID
FROM dynamicregistration_question where ModuleID = @ModuleID AND QuestionType <> 'HTML' AND InActive=0

CREATE TABLE #temp (rowid int IDENTITY (1, 1) NOT NULL,userid int)
INSERT INTO #temp (userid) SELECT userid from [UserPortals] WHERE PortalID = @PortalID
DECLARE @maxq int, @qid int,@sql nvarchar(4000)
SELECT @maxq = count(*) FROM [#MyQuestions]
SET @qid = 1
WHILE @qid <= @maxq
BEGIN

DECLARE @QuestionName varchar(100)
DECLARE @DynamicQID uniqueidentifier

Set @QuestionName = (Select Question from dynamicregistration_question where DynamicQuestionID = (select DynamicID from #MyQuestions where ID = @qid))
Set @DynamicQID = (select DynamicID from #MyQuestions where ID = @qid)


SET @sql = 'ALTER TABLE #temp ADD [' + @QuestionName + '] varchar(500)'
EXEC(@sql)
SET @sql = 'UPDATE t SET t.[' + @QuestionName + '] = r.response FROM #temp t INNER JOIN [dynamicregistration_questionresponse] r ON r.userid = t.userid AND r.DynamicQuestionID = ''' + Cast(@DynamicQID as varchar(100)) + ''''
EXEC(@sql)
--select @sql
SET @qid = @qid + 1
END
SELECT U.UserName AS [DynamicUserName], Z.* FROM #temp Z
Inner Join Users U on Z.UserID = U.UserID
Order By U.UserNAme Asc
GO

Thanks again for your feedback...

-Chad

Gary
Posts:15
wading in the water
wading in the water

09/20/2006 11:36 AM  
Thanks! I will keep that in mind.

I didn't need anything fancy like creating a new table or adding a new column on the fly...I just need specific responses to a dynamic question based on the shortfieldname instead of the questions id. Like a user's Job Title (Dynamic Field, but not core). So, like I mentioned above there is no sproc that will retrieve a user's response by passing the "shortfieldname" Only by questionID, which would have to be hardcoded into my custom module code and then in turn updated when I go live with my new module.

So the SQL statement above does just that...I made an addition to it, so that I can also pass the portal id, just in case there is multiple portals with the same field names.

Follow me?

Thanks for the response, I will keep that in mind for the future.
Gary
Chad
Posts:2386
river guide
river guide

09/20/2006 11:51 AM  
Cool, sorry not trying to over complicate matters. Yes the procedure above should be useful in accessing a users response based upon the short field name and not questionID.

So maybe in a future enhancement adding an area to 'View users response'... could be a seperate page on the module? To some extend you can already do this easily though by going to manage users and then editing the user info?

Or are you saying maybe just add the procedure for other modules to access later?


Gary
Posts:15
wading in the water
wading in the water

09/20/2006 11:57 AM  
Yes, I am retrieving data from your table to be view by any user. It is kind of like a public user profile, so that is why I need it outside of your modules.

Follow me?

Thanks again,
Gary
Chad
Posts:2386
river guide
river guide

09/20/2006 12:05 PM  
Ahhh, yes makes since. Ill see about including a procedure in the next release that can be used and make it easier to pull results in.

For any users looking to actually create public profile pages or detailed user directories/detailed pages you might check out this posting related to Dynamic User Directory and Tailored Text/HTML module. Right now the Tailored Text/HTML module can pull in results easily from the module as well.

For example check out this page demonstrating bringing in results from Dynamic Registration (would be easier with your procedure suggestion though):

http://www.datasprings.com/default.aspx?TabID=733&MyUserID=1437


More info on setting this up can be found here:

http://datasprings.com/Products/ProductForums/tabid/727/forumid/15/postid/85/view/topic/Default.aspx

You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Registration > Suggestions for new Select Statement



ActiveForums 3.7

Copyright 2005 - 2009 by Data Springs, Inc.
Terms Of Use | Privacy Statement