Update the variable value

for example I have variable name called document1
so, I didn’t pass any data for it and completed the task
In database default value taken as NULL
the task went to next level user there he gave document1 data
now how to update the document1 data in database without using restAPI
Please help me out