Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Suggestions for new Select Statement
Last Post 09-20-2006 10:05 AM by Chad Nash. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Gary BellardinoUser is Offline
skipping stones
skipping stones
Posts:12
Avatar

--
09-20-2006 08: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    09-20-2006 09: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 BellardinoUser is Offline
    skipping stones
    skipping stones
    Posts:12
    Avatar

    --
    09-20-2006 09: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    09-20-2006 09: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 BellardinoUser is Offline
    skipping stones
    skipping stones
    Posts:12
    Avatar

    --
    09-20-2006 09: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    09-20-2006 10:05 AM
    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....serID=1437


    More info on setting this up can be found here:

    http://www.datasprings.com/Products...fault.aspx

    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi