To Invalidate Animations on Specified Bone

I want to apply the numerical value directly after invalidating the animation of the specified bone.
What’s the best way?