limit data by user login...
Last Post 09-21-2012 09:26 AM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Nicholas VeneziaUser is Offline
skipping stones
skipping stones
Posts:7
Avatar

--
09-21-2012 05:55 AM
    is there a way to limit data retrieved from SQL statements using the users login id?  Example, after user logs in the values retrieved for a drop down box are only for that user.

    Thanks
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    09-21-2012 09:26 AM
    Hello Nicholas,

    Yes this is possible as long as you have a UserID tied to the records you're tying to your combo box.

    Is your combo box using SQL Driven Options to populate it's records? If it's not, then you can't achieve this functionality.

    You'll want to pull from a SQL table that has a column with a UserID it.

    For instance, say that I want to pull in all Profile Properties for the User Logged in and populate a combo box, I might use the following query:


    Select top 10 B.PropertyName + ': ' + A.PropertyValue As QuestionOption, B.PropertyName + ': ' + A.PropertyValue As QuestionOptionValue from UserProfile A inner join ProfilePropertyDefinition B on A.PropertyDefinitionID = B.PropertyDefinitionID where A.UserID = '$(UserID)'

    Try copy/pasting this into your SQL Driven Options section for your Combo Box and you'll see that the profile properties for the user logged in will be pulled in.

    So this demonstration is showing that if you have a SQL table that you're pulling from and a UserID is stored in a column in the table then you can filter which records to return based on UserID.

    Please let me know if you have any questions.

    Thanks,

    Ryan





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