Mass Update Field Values/Change Select Field Options

  • Matt Hennessy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #111467 by Matt Hennessy
I currently have a select field called "listing_visibility", and this field has two possible values: "Yes" and "No". I'm in a situation where I need to change the possible values to be "True" and "False", and then change all the old yes/no values to be true/false. I think I've figured out how to do this via database queries, but wanted to confirm my understanding before proceeding.

1. Identify the id of the "listing_visibility" field from the *_osmembership_fields table.
2. Find all rows with the corresponding field_id in the *_osmembership_field_value table.
3. Select all rows whose value is "Yes" and replace it with "True".
3. Select all rows whose value is "No" and replace it with "False".

If someone could do a sanity-check and/or let me know if I'm missing anything, that would be greatly appreciated.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #111471 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Mass Update Field Values/Change Select Field Options
Hi Matt

That's all correct

Regards,

Tuan

Please Log in or Create an account to join the conversation.