@chickenfresh for the backend/frontend interaction you can use a surrogate key. pass along an ever-increasing counter that you can correlate with a later update from the backend
1. Enter the value in the textfield
2. Submit the textfield along with a counter that's unique for the current program (say surrogateKey=9)
3. Call the backend asynchronously passing the id from 2.
4. When the results come in from 3 (say with real id=10040506050), lookup the surrogateKey object 9 and apply the read id 10040506050