What happens to deleted Options from an Option Sets?

Hi!

Currently we are using options sets for locations of our stores. There are multiple fields in the database that point to these locations (option set).

We need to delete one of the locations (options).

Before doing it, we would like to know what will happen to the past entries that used the deleted option (location)? Will it appear some error, “null”, or will it maintain the display text?

Thanks for the help!

the past entries will maintain the deleted option set and it will be a ghost data

it’ll still evaluate in expressions as if it existed
it will still exist in the data sent to the page
it will create a bunch of unexpected errors

you have to bulk update to replace the value with something otherwise it gets very messy

1 Like

:wave:

If you need to clean up elements for your past entries, you can also use the search tool to identify all elements where this option set was used. Could be useful if you missed something.

Thanks @mitchbaylis and @ThibautC .

Question: To avoid issues, errors and bulk editing, would it be better to:

  1. Create an attribute for this option set (example “Status”: Enabled / Disabled).
  2. Set a status for each option (location).
  3. Only show Enabled locations in the front of the app.

What do you think?
Thanks for your time