A cheating way to calculate the digital root is to break it into a string, take each position as a number and call a function.
Here's a way of doing it.
You need a new project, a function added, a text input added and a text added (default names)
With this example, it will self update the digital root as you type each number in the text box.