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

One stop solution for events calendar and events registration! Demo site available for free trial.

'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

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.

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.

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!

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.

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

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 . . .

A 16-in-1 dnn module.Powerful yet easy to use. Capable of producing a multitude of functions including:Image rotator/Numeric rotator/ Mp3 player/Wmv player/ Flash video player /YouTube video player/Multimedia player / Text-to-speech podcast / Flipping book player/Banner topic player/Silverlight albu

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   |   Friday, January 09, 2009   
Data Springs Product Forums...
Subject: DynamicForms 2.5 Question Options - SQL Driven
Prev Next
You are not authorized to post a reply.

Author Messages
Daniela
Posts:1
new to the springs
new to the springs

03/11/2008 3:20 AM  

Hi,

maybe anyone can help me:

I would like to populate a list with some data from the database. This seems to be very easy, but i need access to the profile data from the current user, like lastname, firstname, email address etc. Currently i’m using the following sql statement:

Select

Text as QuestionOption

from

dbo.MyTable

where

Substring(countrycode,1,2) = Substring('$(CurrentLanguage)',1,2)

and

mail = '$(Username)'

(There is only the mail(in my Table) and the Username the same in both Tables)

(in both tables there are only the "mail" (my Table) and the "username" (profile data) the same)

The access to the current language ($(CurrentLanguage)) works well. But now I need access to the Username from the current user. I have no idea where to find a list of parameters i’m able to use in my sql statements.

Could you give me a hint where i can find some helpful informations to solve my problem?

Thanks in advance.
Daniela

Chad
Posts:2388
river guide
river guide

03/12/2008 11:38 PM  
Daniela,

Hi. Ok well the first option would be to create a hidden field called something like 'MyUserName' as the short field name and then under 'Advanced Field Options' you could link the field to the username DNN profile property. What this will do is actually always set this field to the username whenever the form is loaded and then you can reference it a $(MyUserName).

The 2nd option is to reference the $(UserID) which is an available parameter for you.

Your query would look something like this (in that area)

and

mail = Select UserName from Users where UserID = $(UserID)

Don't forget that query is just pulling in the question option text and not the value so you need to also pull in QuestionOptionValue column as well.

Please provide some feedback with which option you used to pull the values in and if you ran into any other problems.

-Chad
You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Forms > DynamicForms 2.5 Question Options - SQL Driven



ActiveForums 3.7

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