We solve a generalization of Büchi's problem in any exponent for function fields, and briefly discuss some consequences on undecidability. This provides the first example where this problem is solved for rings of functions in the case of an exponent larger than 3.