Saturday, July 21, 2012

Using Dialogs for Multi-Select Option Sets

Personally, I am not a fan of multi-select options sets (picklists). The reason is, generally, the response is stored as a comma-delimited text field, making reporting do-able but not elegant. The option I steer towards is multiple two value option sets (which, arguably, is also inelegant) or a child entity.

However, the requirement is something that comes up every now and again and here is a codeless solution which gets you there via dialogs.

The Dialog

Here it is:


In this case I am running the dialog off of the Contact record and four questions are asked, all within the same page. When answered, these are used to update the Contact record.

The Prompt and Responses

Here is the first one:


The only thing out of the ordinary here is me changing the Value for the Response Labels. If the answer is ‘Yes’, the value relates to the question; if it is ‘No’, I make the Value also ‘No’.

Updating the Contact

Once all of the responses have been captured, we update the contact record.


The Response Values defined before now populate the Description box (although any text field will be fine).

Seeing it in Action

From a contact record (we cannot run the dialog against multiple records at once, unfortunately) we select the Start Dialog button at the top


and select the dialog of choice.


This is a little awkward but can be improved with a little code and a button, if required.

The dialog opens:


You pick your values, close the dialog and the contact is updated.



If you need a codeless multi-select option set (and many two option fields or a child entity is not an option), this will get you there. It is also completely configurable without having to mess with jscript which, for me, is certainly a bonus.



Scott Sewell said...

Leon - you crack me up.

Leon Tribe said...

Scott: I'm hoping it is the choice of questions rather than the quality of the solution which has you smiling ;)

Joseph Maliwat said...

Leon - is there a way set the default value of a radio button in the dialog without having to make it the topmost choice?

Like, if I want the order of the radio buttons to be:
but I want the default value to be No, is there a way I can achieve this?

Leon Tribe said...

Hi Joseph,

Unfortunately it appears you can set a default for a text response but not for a picklist.

I checked on-premise and online and the behaviour appears to be the same.


Mary Silva said...

May be I could not make any profits at Binary Options market, If I did not find CTOption broker as my platform. Getting suggestion from a close friend about their 'Binary Replicator' feature, I started trading with CTOption broker. Now Luckily, I can make Easy profit at Binary market... :)

Davis Cody said...

After many years using and trading with different brokers, now I am determined to use CTOption as my regular trading platform. I am very satisfied with them, highest payouts, wide range of trading assets and best customer service as well.