Skip to main content
Nintex Community Menu Bar
Question

multiple default values for a multipicklist UI field

  • July 10, 2024
  • 5 replies
  • 19 views

Forum|alt.badge.img+6

Hello all,

is there a way to set multiple default values for a multi-select picklist UI field?

Cheers,

Ben.

This topic has been closed for replies.

5 replies

Forum|alt.badge.img+6
  • Author
  • July 10, 2024

Is there anyone who can help? Cheers, Ben


Forum|alt.badge.img+18

Not exactly.

This is a salesforce limitation, not a squid one.

You can ‘cheat’ with a custom field renderer, however:

var field= arguments[0], value = skuid.utils.decodeHTML(arguments[1]),<br>&nbsp; $ = skuid.$; <br>// If there isn't a value, then make the value our 'default'<br>if (!value) {<br>&nbsp; value = //this should be a semicolon delineated string<br>&nbsp; field.model.updateRow(field.row, field.id, value, {initiatorId: field._GUID});<br>&nbsp; // if you want to save...<br>&nbsp; field.model.save();<br>} <br>//Render<br>skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value);

Forum|alt.badge.img+6
  • Author
  • July 10, 2024

matt, thank you - I’m just learning about Skuid - where do I use this code (with the necessary changes)? Cheers, Ben.


Forum|alt.badge.img+18

This is a custom field renderer. Create a new javascript snippet on your page, name it something reasonable, and paste the code above into the snippet. Then click on the field and change the rendering options to ‘Custom’ and type in the name of your snippet.


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

Matt - worked like a charm - thank you - that makes a big difference at this end. Ben