Hello everyone,
Is it somehow possible to configure an external enumeration provider to return the value as a label if the value is unknown to the provider? An empty string is returned as the label currently if the value is unknown (see function localizeEnumerationValue in formengine-core).
Hi @daniel-radiant-elm,
you can set the “Allow custom values” flag for external enumerations with an autocomplete exposition.
Hello @tim-deep-thread,
yes I did that, but the custom values are not displayed correctly if you use the field in an expression. The expressions are resolved external enumeration provider and it always returns an empty string, if the value is unknown. Also the autocomplete fields are always empty after reopening the screen - due to the same problem.
I attached the workspace to this answer.
YourAppModel_AM.json (3.8 KB)
Person_DM.json (23.2 KB)
Person_FM.json (8.3 KB)
Person_OM.json (3.4 KB)
Expressions on external enumerations with custom values are an interesting use case, which we did not support before. We are currently working on a requirement for the October release to show the custom value in the list of enumeration values, which fixes your point about not seeing it after reopening the screen. I have adapted it to also include expressions on these values. See A12-15339 for more information.
Please note, that custom values will not be persisted in any way. If you select a different value, they will be lost. If you need that, then a developer has to write the value back into the external enumeration source.
Ah okay then I will find use a temporary solution until October. Thank you!