Link to home
Start Free TrialLog in
Avatar of kspuea
kspuea

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kspuea
kspuea

ASKER

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

Thanks very much!