0

I have a content type called Parts. I just added a new boolean field called is_accessory with the default value being false. I added a filter on an existing view to show only Parts where is_accessory is false. When I run the view, no parts show up.

If I go to a Part page, select edit, then select save (without changing anything) that part will show up.

Do I need to write a hook_update_N function that loads and saves all the Part records?

2

You can set the views filter operation to Is not equal to and the value as true.

This should work for new entities that have the value as false and old entities where it just isn't set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.