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!

Pre-populate Registration/Profile fields from a SQL Query
Last Post 10-28-2011 06:41 AM by Troy Dotson. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Troy DotsonUser is Offline
new to the springs
new to the springs
Posts:2
Avatar

--
10-24-2011 10:36 AM
    I have a project where I'm using the DR module to map to the DNN core profile fields.  I need to create some custom fields for the profile and would like to pre-populate them from a SQL query to our HR database (Employee Department, postion, etc.)  

    In this case I would be pulling a snapshot of the HR data from an external SQL database at user registration (they supply the key as their employee ID number in their initial DNN account creation.) Is this possible using the dynamic registration module?  I see that you can populate fields from a SQL Query for combo boxes and such but this would be dynamic per the registant's entries.

    It doesn't have to write the the HR system, only the DNN profile.

    Thanks in advance for any direction...
    Don GeeUser is Offline
    river guide
    river guide
    Posts:273
    Avatar

    --
    10-25-2011 08:36 AM
    Hi Troy,
    Yes, you should be able to do this. Part of the solution is to have a connection to the database. Lets talk about that in a minute. Then you will have for each dynamic question an area called advanced field options. In that area each field must be mapped to the dnn core with the 'quick create' link. Also there is a radio button for SQL options. If you click that you will see some text in the legend that is very important. It says:
    "[L]Note: To enable SQL as a default value for textbox or hidden field types you MUST select only one column from the database and that column must be named DefaultValue. i.e. Select count(*) As DefaultValue from users" This text tells you how to set up a query for each field to pull data from the other database. Don't be literal like think you have to use count(*) that is just an example. You will be using Select 'field name' as Default value. . . Field name will be the other database table's field name that corresponds to the dynamic question in dynamic registration.

    For connecting to your other database you will probably have something like this to implement in the web.config file or somewhere:

    Note:  '<' or '>' use your html to interpret. This place messes up correct html
    <!-- Connection String for SQL Server 2005/2008 --><!-- --><!-- Connection String for SQL Server 2005/2008 - kept for backwards compatability - legacy modules -->
    '<'!-- Connection String for SQL Server 2005/2008 --'>' '<'!-- '--'>' ' <'!-- Connection String for SQL Server 2005/2008 - kept for backwards compatability - legacy modules --'>'

    for Completion Events, use this:
    Data Source=data.YourDataSource.com;Initial Catalog=YOURCATALOG;User ID=sa;Password=YOURPASSWORD

    Hope this helps. If you need some help with this setup some small amount of premium support from DataSprings premium support should get you there.

    Thanks
    Troy DotsonUser is Offline
    new to the springs
    new to the springs
    Posts:2
    Avatar

    --
    10-28-2011 06:41 AM
    Here's our process.

    We have to use Active Directory authentication which isn't supported by DR. When the user initially logs in it creates thier sync-ed DNN account and we prompt them for the only non-standard required profile property, EmployeeID using DNN authentication.  This value is written to thier profile as EmployeeID.

    Users then have an option of registering for a specific role within the site. DR fits the bill here because on a profile update we can add them to a DNN role, update addtional custom DNN profile properties and generate e-mail responses. It also allows us to prepopulate the DR fields with the values  they've already entered including the EmployeeID.

    I need to add addtional pre-popuated fields to the form based on the Employee ID value when the form loads.  I've replicated my HR data in a table on my DNN site so it's in the same database. and can run a SQL query to return a value and apply to to the default value of a DR field.

    SQL:
    SELECT Interests As DefaultValue from dbo.SISData WHERE ccfEmpNum = '999999'

    (This is explictly calling the record for 999999 and populates the profiles Interests field.) 

    I need the SELECT to use the value of the EmployeeID field. (It looks like it should be $(EmployeeID) as noted on the page completion event settings.)

    When I try to set the intial value of the field by the SQL:

    SELECT Interests As DefaultValue from dbo.SISData WHERE ccfEmpNum = $(EmployeeID)

    The field is blank.  What's the best way to accomplish this task? 


    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