I agree with David about training and learning, when I started in navision there was limited training resources so the way I learnt was to look for some example code, being hands on suited my learning better, and the answer to your question is to calculate and then assign.
But without much of training,i was placed with a client alone.So,sometimes i don’t get time to practice and then give them solutions.They demand instant solutions,in that case i will seek for some expert help.
[:^)] Someone has done something very wrong here - placing you, without training (experience?), with a customer that demand instant solutions from you??
Oh my! [:’(]