Expand my Community achievements bar.

Join us for our Coffee Break Sweepstakes on July 16th! Come ask your questions or share your use cases on Creative Briefs for a chance to win a piece of Workfront swag!
SOLVED

Changing one value based on another

Avatar

Level 5

In Workfront we have two fields on an intake (request) form: Tier and Project Type. The Project Type field needs to be limited as follows:

 

If Tier 1, Discovery or Creative can be chosen

If Tier 2, Discovery or Creative can be chosen

If Tier 3, Only Creative can be chosen

If Tier 4, Only Creative can be chosen

 

To try to implement this, we have set the default value of Project Type to "Creative" and set it's visibility to only show up if Tier 1 or Tier 2 is selected. For the most part this works. If someone selects Tier 3 or Tier 4, the Project Type field does not appear and is defaulted to "Creative". If someone selects Tier 1 or Tier 2, the Project Type field appears (defaulted to "Creative") but they are able to change the selection to "Discovery".

 

The problem we're running into is that someone can choose Tier 1 or Tier 2 to make the Project Type field appear, change the Project Type to "Discovery", then change the tier to either Tier 3 or Tier 4. This will cause the Project Type field to disappear yet stay selected to "Discovery". This breaks our requirements of only allowing "Discovery" to be selected for Tier 1 or Tier 2 requests.

 

So, is there a way to either:

  1. Change the value of a field along with its visibility? (e.g. when Project Type is changed to not-visible its value will change back to "Creative". or
  2. Change the value of a field based on another field? (e.g. whenever the tier is set to either Tier 3 or Tier 4, the Project Type changes to "Creative."

 

Change value based on another.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I have run into this problem before, and the only workaround that I found was to surface the two fields when filling out the form, but then use a calculated field with if statements to use the secondary field selection, so you can say if({field A} = {Option 1}, {field 1}, if({field A} = {Option 2}, {field 2}, etc....)). That way it doesn't matter if they leave secondary fields selected, the calculated field will only report on the paired secondary field based on the selection in the first.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

I have run into this problem before, and the only workaround that I found was to surface the two fields when filling out the form, but then use a calculated field with if statements to use the secondary field selection, so you can say if({field A} = {Option 1}, {field 1}, if({field A} = {Option 2}, {field 2}, etc....)). That way it doesn't matter if they leave secondary fields selected, the calculated field will only report on the paired secondary field based on the selection in the first.