is it possible to render a picklist field in a field editor as multiPicklist?

The use case here being that I don’t actually want to save the record which contains the picklist - I am just using it to retrieve multiple values which the user has chosen from the picklist field, and then use a snippet to stick those values into a condition on another model, and run a query.

So really its just a simple picklist field in a field editor, but I want it to render as a multipicklist…

Yes, this is doable by using the following Custom Field Renderer Snippet for the picklist field:

var field = arguments[0],<br>&nbsp; &nbsp;value =&nbsp;skuid.utils.decodeHTML(arguments[1]);<br>skuid.ui.fieldRenderers.MULTIPICKLIST[field.mode](field,value);

works perfectly. Thanks Zach.

Can I display this rendered Multiselect picklist in ‘Checkboxes’ format? Like the same way Skuid displays for multiselect picklist when we select ‘checkboxes’ as field renderer.

Yes, use this instead:

var field = arguments[0],<br>&nbsp; &nbsp;value =&nbsp;skuid.utils.decodeHTML(arguments[1]);<br>field.options.type = "CHECKBOXES";<br>skuid.ui.fieldRenderers.MULTIPICKLIST[field.mode](field,value);<br>field.options.type = "CUSTOM";

Thank you Zach and OP, you just saved me a few difficult hours :slight_smile:

I am having trouble in rendering a auto complete field as multi select. Can anybody help?

Hi Sayan, I’m assuming your autocomplete field is a lookup field to another object - how many records does the lookup object contain? (ie - there are limits to how many values a picklist can contain). 

Can you give us some more info and post a screenshot of what you need to do?

I have a field called Property on case that is lookup to Product. While creating case record i want users to be able to select more than one Property.

A lookup record can only contain a relationship to one other record - so you won’t be able to select multiple Products for that one case. If your users will only ever need to select 2 or 3 records, then you could create another couple of lookup fields on the Case object.

But if your users might want to select ‘many’ related products, then you will need to look at building a Junction object between Case and Product - check out the documentation here on a ‘many to many’ relationship. This would mean that rather than having a ‘field’ called Property, you want to create a new ‘Custom Object’ called Property, with a master-detail lookup to Case, and another Master-detail to Product.

How can we access the multiselect picklist values and label seperately. As accessing the field always returns value, if i need the label at somepoint how do we do that?