We propose a new definition and use of a primitive getAllValues, for computing all the values of a non-deterministic expression in a functional logic program. Our proposal restricts the validity of the argument of getAllValues. This restriction ensures that essential language features like the call-time choice semantics, the independence of the order of evaluation, and the referential transparency of the language are preserved when getAllValues is executed. Up to now, conflicts between these language features and primitives like getAllValues have been seen as one of the main problems for employing such primitives in functional logic languages.