Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0GetUsersByProfileProperty and null valuesGetUsersByProfileProperty and null values
Previous
 
Next
New Post
10/4/2009 11:51 PM
 

Ok, it's easy to use UserController.GetUsersByProfileProperty to get an arraylist of users with certain value on certain profile property. But, how can I get all the users wich certain profile property is not set? I've tried everything I can think of but I always get an empy array:

ClientesGridView.DataSource = UserController.GetUsersByProfileProperty(PortalId, "Operador", "", 0, integer.MaxValue , -1)

I've tried other values like: Nothing, String.Empy, Null, "Null", "IS NULL", etc.

Does anybody know how this can be done?

Thanks in advance

 
New Post
10/5/2009 1:09 PM
 

Nobody?

C'mon, this can be done right?

 
New Post
10/18/2009 7:39 PM
 

Seriously?

I'm sure it's just something simple that I'm missing.

Someone help please.

 
New Post
10/18/2009 9:10 PM
Accepted Answer 

Due to the way that the UserProfile table is joined to the Users view in the GetUsersByProfileProperty stored proceedure, the GetUsersByProfileProperty method cannot be used to obtain a list of users for which a value for a particular profile property has not been entered.

You would have to either write your own stored proceedure and controller method or iterate through a collection of UserInfo.Profile objects testing for null values for a particular profile property name.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
10/28/2009 6:51 PM
 

Thank you so much William, I will see how to workaround this.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0GetUsersByProfileProperty and null valuesGetUsersByProfileProperty and null values


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out