I imagine someone has asked this before, but I can’t seem to find it after looking through a few dozen topics.
Here’s the scenario:
- Field A is a text field which can have values such as Tier 0, Tier 1, Tier, 2, etc. populated by WF rules
- Field B is a picklist for upgrading the above Tiers with 2 values, Tier 3 and Tier 4
- Tier 3 should only be available for select if Field A is Tier 2, or if Field B itself is Tier 3 (so we can unselect the upgrade)
- Tier 4 should always be selectable
This is what we previously used for Lead Status, which was only rendering based on its own values:
var field = argumentsr0], //value = skuid.utils.decodeHTML(arguments(1]);
value = arguments 1],
$ = skuid.$;
var picklistEntries = field.metadata.picklistEntries;
// If value is Reached Out or Engaged,
// then only show those values
if ($.inArray(value,(‘Reached Out’,‘Engaged’])!==-1) {
picklistEntries.length = 0;
picklistEntries.push(
{ value: ‘Reached Out’, label: ‘Reached Out’, defaultValue: false, active: true },
{ value: ‘Engaged’, label: ‘Engaged’, defaultValue: false, active: true }
);
} else if (value===‘Sales Accepted’) {
picklistEntries.length = 0;
picklistEntries.push(
{ value: ‘Sales Accepted’, label: ‘Sales Accepted’, defaultValue: false, active: true },
{ value: ‘Reached Out’, label: ‘Reached Out’, defaultValue: false, active: true },
{ value: ‘Engaged’, label: ‘Engaged’, defaultValue: false, active: true }
);
}
// Run the standard picklist renderer for the given mode
skuid.ui.fieldRenderers>field.metadata.displaytype]field.mode;
Where might I start to pull in that Field A value and use that in the logic? (I really this is pretty basic, so thanks in advance)