Need help with reference qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 05:24 AM
I have this form (sys_user_has_skill table)
skill.u_skill_area is a custom field that I created in cmn_skill table referring to u_skill_area.
skill is a reference field to cmn_skill table.
I want to write a reference qualifier to skill field such that it will only display those values related to u_skill_area chosen.
I have the following reference qualifier:
javascript:
var skillArea = skill.u_skill_area;
if (skillArea) {
return 'u_skill_area=' + skillArea;
} else {
return '';
}
However it is not working. How to fix this? I also tried: var skillArea = current.skill.u_skill_area;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 05:36 AM - edited 10-18-2024 05:52 AM
You would use current.skill.u_skill_area. The trouble I see with your screenshots and the way this is setup is that Skill Areas only exist on Skill records. Your reference qualifier is on the skill table meaning you haven't yet selected a skill, so current.skill is empty, therefore current.skill.u_skill_area would be empty.
You can display Skill Area on the User Skill form by dot-walking as you have, but the order to use these fields is Skill first, then the Skill Area populates from the skill record. If you change the Skill Area then save the User Skill record, the Skill Area on the Skill will be updated (for all users with that Skill).