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 ListCalculated Column, Username tokenCalculated Column, Username token
Previous
 
Next
New Post
3/24/2010 11:35 AM
 

Hello,

I use UTD. Scenarion: A registered user may add a record to UTD. In a calculated column (hidden from users) i should place username of the logged user as Text field. 

My task - through xsl to filter the rows of UTD which correspond to the logged UserName only. So, only the rows which the user itself entered are visible by this user.

Everything works fine when i use a normal Text Column where the user enters himself his username. The code for xslt correctly filters the users and shows visible rows to the user only. 

If i try to change the normal Text Field of UTD with a Calculated Column field and place a token [User:Username] than I have a problem. The problem is that all columns in the UTD should be the [User:Username], not  the stored usernames. 

How to achieve that thinng with a Calculated Column?

Best Regards, DMtiar

 
New Post
3/24/2010 12:19 PM
 
you need to compare with one of the hidden columns, e.g. createdby_UDT_originalValue. please refer to the user manual for a complete list.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/24/2010 12:40 PM
 

Dimitar, I actually had this same problem and here is how I resolved it (not an expert by any means).

1. Create your form with the username field inputted into. This form will be on your main page (e.g. the results of the form), but switch it to list mode. In my case it was a list of tasks. I have the list by default in list mode on the one page. The field I use is called "Assigned_to." Make sure there is no space in the name of the column.

2. Create another page in your portal. In my case I called it "My Tasks", which are a list of tasks assigned to the logged in user.

3. A. Go to the top of the admin field and switch the module piece to "Add existing module".

3. B. Select the page that holds your list and module you want to filter by username.

3. C. Select the existing module that you want to filter.

3. D. Add it to the new page. It will look like it does on the previous page in list mode.

4. Go to Form & List Configuration.

5. Scroll down to the FILTER section under Page Related Settings.

6. Put something similar to this (replace Assigned_to with your field name):

[Assigned_to] like '[User:Username]'

7. Click Save Configuration.

 

This new page will ONLY show data for that form for the logged in user. If you want to use other users though, you'll need to use a querystring with the same copy methodology. I've been only starting to use F&L, but I use it with my customer ID field and create a duplicate of each to tie them all together. In that case, you'll need to use a calculated column with something similar to this:

 

'<a href="http://dotnetnuke/Customers/TasksbyCustomer.aspx?CustomerCode='+[CustomerCode]+'">Click Here</a>'

 

In this example, the duplicated task list page I created is setup with a filter to only show rows with the querystring value. Example:

 

[CustomerCode] like '[Querystring:CustomerCode]'

The value for CUSTOMERCODE that you see in the calculated column is coming from the CUSTOMERCODE in the customer list. Essentially what happens is there's a link on the customer page to the tasks for that customer. The resulting URL that comes in the link looks like this:

 

http://dotnetnuke/Customers/TasksbyCu...

The only caveat is that when you click on that and there's no data, it will just show a blank page with the title and the search box (if you have it).

 

Hope this helps. I wish I had this knowledge when I started.

 
New Post
3/25/2010 6:58 AM
 

Sebastian, please help me with the syntax. I tried so many variants. I read the manual. I use UDT 3.05. Can't get into the logic and the syntax.

createdby_Original_Value or [createdby_Original_Value] or [Created by_Original_Value] or anything else....should i use it in Calculated Column, Text Type or anything else..?

it's onne of those days totally out of luck. How, what should i compare to?

Thanx in advance, DMitar

p.s. Jesse, thanks for your solution, i'll investigate, but i know sebastian's woud work and it's simpler. i think your solution might be useful to know it.

 
New Post
3/25/2010 6:37 PM
 
Dimitar, please use the following filter expression: [User:UserName] = [Created by_UDT_Original]

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListCalculated Column, Username tokenCalculated Column, Username token


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