How do I clear an infolog message x++


In D365F&O I am displaying an info() message when the user has to enter a certain value. Once the user has entered the correct value, I want to remove the info message from the top of the form. Search for the information, I found some posts that showed using InfoLogLine() with info.Clear() to do this, but it’s not working. How cal I clear an infolog message by x++?