We prove some sufficient condition for the mapping $T\colon X\to X$, $(X,d)$ being an ultrametric space, such that there exists a ball $B\subseteq X$, $T\colon B\to B$, with property that function $f(x)=d(x,Tx)$, $x\in B$, is metric locally constant.