User Portlet User Portlet

Discussions
I apologise for the initial post, but it surprised me that the evaluation worked! Ok so here is a fuller code. I do get inconsistent results with this but it seems simple enough that a button should be able to execute a user defined function ...
I am a new user. I have Mathematica 11.3 student edition (on two computers win 10) I have found mathematica very powerful but there is a problem I can find no information about, actually two but probably related and it occurs on both computers 1....