Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Displaying SubCategories in a categories field

Posted on 2002-04-19
12
253 Views
Last Modified: 2013-12-18
I have created a categories field and I am able to create subcategories by using the '\'.  

I am using a formula to create the list of choices for a categories field.  This formula does a dbColumn lookup from a view called "By Category".  Here is my formula currently:  

@Unique(@DbColumn("":"nocache"; ""; "By Category"; 1))

This formula only returns a list of the highest level categories, but does not list the subcategories. Can I create a formula that will return the subcategories as well?

Thanks!



0
Comment
Question by:sauce12
  • 4
  • 4
  • 4
12 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6954823
Create a view which lists both Cateogory and SubCategory fields... and then use dbcolumn.

or

use the column number where the subcategory is listed in second dbcolumn like this (assuming, subcategory is second col)
@Unique(@DbColumn("":"nocache"; ""; "By Category"; 1)):@Unique(@DbColumn("":"nocache"; ""; "By Category"; 2))


~Hemanth
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6954859
Sorry sauce12, but this can not be true.

If you request the first column, like:
@Unique(@DbColumn("":"nocache"; ""; "By Category"; 1))

than you get all values from all categories contained in this first column.
All categories from all levels in this first column are separate elements.

You have anywhere else an error.

0
 
LVL 10

Expert Comment

by:zvonko
ID: 6954863
Where do you see the result from this @DbColumn?

I suggest to you to make for this test in a form a computed for display field containing this @DbColumn as value formula. So you can compare the results.

0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:sauce12
ID: 6954868
Hemanth -

Can I create a view containing categories and Subcategories without spliting the those into 2 fields on my form?
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6956058
In the first column, include formula like this

Category : SubCategory

and sort it and check show as seperate entries in view property.
0
 

Author Comment

by:sauce12
ID: 6956085
I want to make sure we are on the same page here.  As I understand, if I create a field named "categories".  It serves as sort of a keyword in notes.  That is, it allows you to create subcategories by entering something like this:  

MainCategory1/SubCategory1

Is this correct about how "categories" is some sort of keyword in notes?

And then when I create a view with the value of the first column as "categories" and check that it is a categorized field - it will display like this:

>MainCategory1
  >SubCategory1
    My document

That works fine for me.

What I want to be able to do is when I use a formula to generate a list of values for my "categories" field.  I would like for it display:
MainCategory1
MainCategory1/SubCategory1

Or something like that, as long as Subcategories are also shown.  I hope that clears things up.  Is this possible?

Zvonko -
 
This is how you think it should work, using the formula I am using now?  You are suggesting that I should get all categories and all subcategories returned to my list if I use that formula?

Thanks!
0
 
LVL 10

Accepted Solution

by:
zvonko earned 100 total points
ID: 6956796
Hello,

this your last comment does not match to the first line of your question. In this last comment you have not loose one word about the fact that this main and sub categories are all in the same (in the first) column.

And when you request the first column in your @DbColumn command then you get the first column. Full stop.

Now what do you like to get back?

If you like to get: "MainCategory1/SubCategory1"
then create a new view as Hemanth sugested where this first column is sorted (categorized is not important because of the @Unique function afterwards) and composed with this forward slashes.

If you like to get a list of all categories as single elements, then you have not to do anything. As I mentioned in my first comment: this is the default behavior.

If you simply disable the Categorized option for this first column and let it be Ascending sorted, then you will get: "MainCategory1\SubCategory1"
back as elements.

So, what is your need?



0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6958209
If that is what you are looking then you have to alter your formula and build a hidden view without category on categories column

The formula goes like this
t := @Unique(@DbColumn("":"nocache"; ""; "By Category"; 1))
t : @Left(t;"\\")

0
 

Author Comment

by:sauce12
ID: 6958403
Thanks for the ideas.  I'll play around with it tomorrow morning.  Hemanth - do I need to declare t in the example above.  If so as what?  Thanks.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6959858
It is just a temp variable in formula.
0
 

Author Comment

by:sauce12
ID: 6960484
Basically, I just needed sort the first column of my view alphabetically instead of making it categorized.  I didn't know that this affected the dbcolumn funtion.  Thanks!
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6961121
Thank you for the points :-)
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Encrypted Mail message in a NSF 10 30
Lotus notes email code 6 116
@ command if structure getting unmanageable 12 100
@Mailsend 3 66
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question