Clear prior dynamic output prior to view new one?

This notebook works just fine. However, on sequential use of the “Submit” button the prior result remains and a new result is output below the old. How can I clear the prior output so that only the new output shows?

Hi Roger,

Is there a reason for using Print to show the output? Why not render the output as part of the UI? e.g.

The attached file has the code. There is a bug in AccountingForm, it does correctly format Quantity objects so instead, used a light red background for negative NPV.

PropertyCalculator.nb (21.2 KB)

That would be just fine except it does not CloudDeploy. Is there a reason for this? I had not considered your method…

Well, it does CloudDeploy, however, four of the InputField report an error

TypeError: Cannot read properties of undefined (reading ‘forEach’)

Observe that all of those fields have Real values, the ones that work have Integer values. This is most certainly a bug in InputField when type is Number. Change Number to Expression for those four and it works fine. You should probably add some error checking in case the user inputs a non-numeric value.

Deployed version.

Thanks for solving my problem!!

You are welcome. BTW the URL to your website on your profile page is incorrect. It should be http://www.mathestate.com/