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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListFilter list on User Security RoleFilter list on User Security Role
Previous
 
Next
New Post
4/24/2009 5:41 PM
 

Michael McDonald wrote


I'm using DNN5.  I've attempted using [user:roles] in an expression and always get an invalid expression.  I looked at the 3.51 doc and it appears user:roles contains a pipe delimited list of roles like |Role1|Role2|Role3| ..

It is not [user:roles] but /udt:Context/udt:UserRoles, which is the original way we made context information available for XSL scripts. It is still also inside form and List, though it can't be used for normal filters.

 
New Post
4/25/2009 12:51 PM
 

I guess I'm confused by the filter expression. I'm using Dnn 5.0.1 with forms & Lists 5.0.  The ? next to the field states "Use SQL Where clause syntax" but the manual 3.5.1 states use DataColumn.Expression syntax for the filter expression.  Regardless, what I have been attempting hasn't been working.

Here's what I'm attempting to do (maybe my thinking is way off base): 

The Boss wants (yesterday) privately registered users to see a list of Natural Gas Wells with their operational status.  They should only see the wells they are invested in through an investment program.    I have made the "Program" names into security groups. 

I've loaded the UDT with Well status data with the following columns Program, WellName and OperationalStatus (all text fields)  A well belongs to only 1 Program.  The Program column values are the same as the security role names.  The Program/role names are never overlapping - that is it you search a delimited list, you will never find a Program as a substring of a another program/role name.  (theres no need to wrap a search value n commas)

Each registered user may be a member of multiple security roles. i'd like to have a single list of wells that is filtered instead of maintaining 250 lists.

I have yet to get the DataColum expressions to work in the filter statement field and I'm not exactly clear as to what is going on behind the scenes.  Since my filter expression isn't working referencing the [user:roles] token I'm thinking maybe I can use a calulated coumn to test whether the [Program] field value is IN the  [User:Roles] delimited list. If it is, the calculated value returns 1 else 0.  Then my Filter expression would be [CalulatedFieldName] = 1

Well that's my thought on my new approach.  I hope this makes more sense.

            CalcCol: tIIF([Program] IN [User:Roles], 1,0)    or somehting like that.
   FilterExpression:  CalcCol = 1

 Sorry to be such a pain.  If this works, others my be able to use the same approach to get a relationship between users and a UDT.

 
New Post
4/25/2009 1:11 PM
 

please try the following filter expression:

',[User:Roles],' LIKE '*,[Program],*'


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/25/2009 2:49 PM
 

Thanks Sebastian, I gave it a try.

It didn't work.  it gave me "Unsupported Filter Statement"  Here is what I pasted to the filter expression text box

                            ',[User:Roles],' LIKE '*,[Program],*'

I also tried ',[User:Roles],' LIKE '%[Program]%' and it gave me an unsupported filter statement too.
It seems in prinicple it should work.  My calculated column isn't working.  I tried creating a calculated column that would let me
see the content of the token  IIF(1=1,[User:Roles],'') or IIF(1=1,'[User:Roles]','') but it just displays ********

Mike

 

 
New Post
4/26/2009 11:21 AM
 

Sebastian,

It appears the token [User:Roles] is returning either an empty string or 7 asterisks depending on the login.
I created a calculated colum with the expression:   IIF(1=1,'[User:Roles]','DoNotCare').  For the Site admin
this displays 7 asterisks, for the test user, the calculated field is blank.  I then tried the expression
IIF(1=1,LEN('[User:Roles]'),'DoNotCare') in the calculated column and I get 7 for the site admin and 0 for the test user.

Thanks for your effort.  I've got some other ideas that I'm going to explore.  If I find one that works, I'll share it.

Mike McDonald

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListFilter list on User Security RoleFilter list on User Security Role


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