?
Solved

How to show values in second column which based on first column in the view?

Posted on 2003-11-13
2
Medium Priority
?
189 Views
Last Modified: 2013-12-18
Hi all,

Need help urgently to resolve this problem.
I have a form (called "frmAdvInfo"), which has 10 fields (called "SkillCseNm1", "SkillCseNm2", etc) for users to key in "Skill-based" Course Name, and another 10 fields(called "KnwCseNm1", "KnwCseNm2", etc) for users to key in "Knowledge-based" Course Name.

So in a view, I need to show the Category of the Course Name (whether it's "Skill-based" or "Knowledge-based") in the 1st column. In the 2nd column of the view I need to show the Course Name, ie. if the Course category is "Skill-based", I need to show the values of "SkillCseNm1", "SkillCseNm2" etc fields. If it's "Knowledge-based" course, then I need to show the values of "KnwCseNm1", "KnwCseNm2" etc fields.

I have managed to show the first column values (ie, the category of the courses - Skill-based or Knowledge-based).
Here is my formula of 1st column:
tmpSkill := @If(@Trim(SkillCseNm1)!="" | @Trim(SkillCseNm2)!="" |@Trim(SkillCseNm3)!="" | @Trim(SkillCseNm4)!="" | @Trim(SkillCseNm5)!="" | @Trim(SkillCseNm6)!="" | @Trim(SkillCseNm7)!="" | @Trim(SkillCseNm8)!="" | @Trim(SkillCseNm9)!="" | @Trim(SkillCseNm10)!=""; "Skill-based"; "");
tmpKnw := @If(@Trim(KnwCseNm1)!="" | @Trim(KnwCseNm2)!="" | @Trim(KnwCseNm3)!="" | @Trim(KnwCseNm4)!="" | @Trim(KnwCseNm5)!="" | @Trim(KnwCseNm6)!="" | @Trim(KnwCseNm7)!="" | @Trim(KnwCseNm8)!="" | @Trim(KnwCseNm9)!="" | @Trim(KnwCseNm10)!=""; "Knowledge-based"; "");
@Trim(tmpSkill:tmpKnw)

Does anyone know how to resolve this?
Thanks very much in advance.

kspuea
0
Comment
Question by:kspuea
2 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 280 total points
ID: 9744623
Can a document have both skill and knowledge based, or should it only have one type.
if it can only have one type, this is how I would do it.

have a radio button on the top of the form, where user chooses skill or knowledge.  Now, you only need ten fields CseNm1...CseNm10,  The first view column will just be the radio button field.

If you need to allow both, then what you should do is have a single column that categorizes on two parts. Here's your formula:

SkillNames := @Trim(SkillCseNm1 : ... : SkillCseNm10);
KnowNames := @Trim(KnwCseNm1 : ... : KnwCseNm10);
Skills := @If(SkillNames = ""; ""; "Skill-based\\" + SkillNames);
Knows := @If(KnowNames = ""; ""; "Knowledge-based\\" + KnowNames);
@Trim(Skills : Knows);


This column should be categorized.  Even though it is a single column, it will be treated as two categorized columns, separated by the \\
0
 

Author Comment

by:kspuea
ID: 9745600
Yes, the document can have both types of courses.
Bingo, qwaletee! Your method is working wonderful!!!  :-)

Thanks very much!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

809 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