Expand my Community achievements bar.

SOLVED

How to add and remove values from an Enumeration via JavaScript

Avatar

Level 1

We are building a process that will ingest a file of values from a source. Our intent is to use this data to produce a drop down list in a form for some data entry. This is accomplished via an Enumeration set as the dbEnum value that drives rendering.

 

As values may be added and removed from the source, we need to be able to do the same with this Enumeration. Decisions on whether to use a truncate and reload vs an incremental load strategy are TBD, but we need to understand the options. Is there a way to add/remove/clear an Enumeration's data via JavaScript?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Ryan_Bard ,

You can try this approach: create a enumeration in /Administration/Platform/Enumerations/

And in import workflow, use Update data activity > Update dimension as 'Enumeration value (xtk:enumValue)'

And reconcile with Enumeration's primary key or internal name of the enumeration created in previous step and select operation as either insert or as Delete depends on your plan.

Example,

ParthaSarathy_1-1738307179839.png

ParthaSarathy_0-1738307026445.png

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @Ryan_Bard ,

You can try this approach: create a enumeration in /Administration/Platform/Enumerations/

And in import workflow, use Update data activity > Update dimension as 'Enumeration value (xtk:enumValue)'

And reconcile with Enumeration's primary key or internal name of the enumeration created in previous step and select operation as either insert or as Delete depends on your plan.

Example,

ParthaSarathy_1-1738307179839.png

ParthaSarathy_0-1738307026445.png

Avatar

Level 1

Thank you very much for the guidance!