function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
olwolw 

VR requiring a picklist field to be filled based on multi select Picklist field

Hello out there,

 

I have a multi select picklist called "Artist_Type__c". The values in "Artist_Type_c" are also the title of other picklists. "Visual_Artist__c", "Sculptor__c", etc. I need a rule that forces the user to make a selection from the picklists based on their response in the multi select picklist. Is this possible? If so, help!

 

Thanks, everybody!

Olivia

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Okay so you basically need something like this:

OR(
AND(
INCLUDES(Multi_Picklist_1__c , "1"),  
ISBLANK(TEXT( Picklist_1__c ))),
AND(
INCLUDES(Multi_Picklist_1__c , "2"),  
ISBLANK(TEXT( Picklist_2__c ))),
AND(
INCLUDES(Multi_Picklist_1__c , "3"),  
ISBLANK(TEXT( Picklist_3__c ))),
AND(
INCLUDES(Multi_Picklist_1__c , "4"),  
ISBLANK(TEXT( Picklist_4__c ))))

 

All Answers

Steve :-/Steve :-/

Do they need to select 1 of the other picklists or both of them?

olwolw

If they select "Performer__c", "Visual_Artist__c", and "Painter__c" for example in the multi select, I want them to make a selection from the "Performer", "Visual Artist", and "Painter" picklists. So the number of picklists that they make a selection in is dictated by how many values they selected in the multi select picklist. 

Steve :-/Steve :-/

Okay, can you post the complete list of MultiPicklist options and the API Fieldnames of the required child picklist fileds?

olwolw

Of course!

 

The multi select: "Artist_Type__c"

Visual Artist
Music
Dance
Theater
Performance Artist
Media Arts

Sculptor

Artisan (Crafts) Type
Literary Arts

 

The picklists:

Visual_Artist_Type__c

Sculptor_Type__c

Artisan_Crafts_Type__c

Design_Arts_Type__c

Music_Type__c
Dance_Type__c
Theater_Type__c
Media_Arts_Type__c
Literary_Arts_Type__c

Steve :-/Steve :-/

Okay so you basically need something like this:

OR(
AND(
INCLUDES(Multi_Picklist_1__c , "1"),  
ISBLANK(TEXT( Picklist_1__c ))),
AND(
INCLUDES(Multi_Picklist_1__c , "2"),  
ISBLANK(TEXT( Picklist_2__c ))),
AND(
INCLUDES(Multi_Picklist_1__c , "3"),  
ISBLANK(TEXT( Picklist_3__c ))),
AND(
INCLUDES(Multi_Picklist_1__c , "4"),  
ISBLANK(TEXT( Picklist_4__c ))))

 

This was selected as the best answer
Steve :-/Steve :-/
OR(
AND(
INCLUDES(Artist_Type__c , "Visual Artist"),  
ISBLANK(TEXT( Visual_Artist_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Music"),  
ISBLANK(TEXT(Music_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Dance"),  
ISBLANK(TEXT( Dance_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Theater"),  
ISBLANK(TEXT( Theater_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Performance Artist"),  
ISBLANK(TEXT( Design_Arts_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Media Arts"),  
ISBLANK(TEXT( Media_Arts_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Sculptor"),  
ISBLANK(TEXT( Sculptor_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Artisan (Crafts) Type"),  
ISBLANK(TEXT( Artisan_Crafts_Type__c ))),
AND(
INCLUDES(Artist_Type__c , "Literary Arts"),  
ISBLANK(TEXT(Literary_Arts_Type__c))))

 

olwolw

It works perfectly. Thank you, Stevemo!! 

Steve :-/Steve :-/

No problem, you owe me a beer!  ;-D

 

Jonye KeeJonye Kee

Our administrations go way farther than finishing. From the very first moment when we began, we generally get requested to do any remaining structure work on the activities we work on.

Check this: painter and decorator brighton (https://www.lgcdecorators.co.uk/our-services/property-maintenance/)