Skip to main content

We have a UI-Only picklist providing a subset - actually a different set - of values to a lengthy list specified in the database.

The skuid page needs to

  • copy the value from the database field to the ui-only field on query,

  • allow edits to the ui-only field, and then

  • copy the ui-only value to the database field on save.

We used to do this with merge syntax on the Update-field-on-row action. Now, we have to override the picklist validation by going to XML.

An example, set up a little differently:

The sObject includes Color__c, defined with values “Red”, “Blue”, “Green” and not restricted to these values.

The model includes a UI-Only field, UI_Color, with values “Yellow” and “Orange.”

The table displays Color__c and has a custom Edit row action. The action updates UI_Color to {{Color__c}} (in the XML. We cannot do this in the composer!) and then opens a popup.

The popup displays UI_Color in a field editor, allowing the user to select either Yellow or Orange.

The custom Save button on the popup updates Color__c to {{UI_Color}} – also in the XML because it can’t be done in the composer.

My thinking is that recent releases in v11.2 have added picklist field validation but have now tightened down the restriction to not allow for picklist fields that do not require values to be in the database list of values. We need an option to allow entry of values that either are not defined in the database field or are copied from other fields in the model - or even from other models - as used to be possible.

The overly restrictive version is v11.2.22.

I have noticed this as well…it would be very nice to have the option to select one of the pre-defined picklist values or the option to use a result from a formula where merge syntax can be used.


Ironically, it is possible to fool the composer by entering the desired “invalid” value before selecting the picklist field. The Value field turns out to be sticky enough to override the validation.


Hi Mike, I’m not sure if we completely understand your use case. Have you tried the option to override the field metadata at the model field? If yes, but it doesn’t meet your requirements, could you please let us know, why not? Furthermore, would be great if you could share a simple repro page XML with us here in the post.


It will take me awhile to put a repro page together, especially since we only use custom objects. I may not be able to try your suggestion for awhile either. I recall that it was considered, but don’t recall if we encountered a limitation. I do have the workaround that I mentioned previously, as well as the ability to edit the XML directly, so there is no urgency. 


Our expectation is that Skuid will provide the ability to work with the Salesforce setup/admin options, where a picklist field (optionally) does not restrict the picklist to the values defined in the value set.


Hi Luiz, are you saying to that to assign single specified value to a picklist field we need to edit XML or use the Stickiness that Mike mentions? ditto conlan- Ironically, v1 seems to work fine but v2 doesn’t.

Following is quick demo page: The value was placed using sticky Value approach but obviously there should be numerous other options (standards).

Thanks,

AP


<skuid__page unsavedchangeswarning=“yes” personalizationmode=“server” showsidebar=“true” showheader=“true”>













<skuid__table model=“testPickListField” uniqueid=“sk-epK-65” mode=“read” title=“Test Set Single Value”>



















</skuid__table>











</skuid__page>


Reply