How to add and remove values from an Enumeration via JavaScript | Community
Skip to main content
Level 2
January 30, 2025
Solved

How to add and remove values from an Enumeration via JavaScript

  • January 30, 2025
  • 1 reply
  • 536 views

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?

Best answer by ParthaSarathy

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,

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
January 31, 2025

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 S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Ryan_BardAuthor
Level 2
January 31, 2025

Thank you very much for the guidance!