Autogenerate event

Is it possible to define a program rule to assess whether a self-generated event should be omitted from the timeline data entry?

I am trying to use the following rule:

! d2: hasValue (# {Basal risk - Musculoskeletal problem})

It meens that If a variable does not have a value, then hide the program stage.

However, this just hid it so I couldn’t create more. But the events already scheduled that were on the timeline data entry were not hidden.

How to deal with it?

I was also left with the following question: is it possible to schedule an event, putting days scheduled from start, but leaving the autogenerate option disabled? How will the event be created in this case?