Free Trial Book a Demo
logic app best practices

Logic App Best practices, Tips and Tricks: #5 Delete comments

Categories: Azure Serverless Tags:

Are you surprised? Are you under where are the first four tips?

I start this series of blog posts on my blog, and you can see and read the previous Best practices, Tips, and Tricks here:

And I will be sharing some of them here and others on my blog. So stay tuned for both blogs.

Of course, the most recurring task is adding comments to our triggers and actions, but it is always good to know you to delete them. Some of you may be thinking that is a trivial task, simple like adding a comment. But, unfortunately, I have to say that nothing is that trivial in Logic Apps, even this fundamental task.

# Delete Comments

As I mentioned in #3 Add comments, is it essential to add comments to all our actions or at least in the most important ones. And the reasons for that are:

Comments improve readability

By setting comments in your actions, you can quickly identify what action is intended for and what is doing, without the need to read all the settings inside the action to try to figure it out. And sometimes, that may not be enough, and you still need to go to some documentation (API Documentations, project documentation, and so on) to understand.

So, you provide readability and save time (not spending a considerable amount of time looking at the details and configurations inside your actions) and frustrations. You may think that this is not important. You have created the Logic App business workflow. You know the logic inside and what shapes represent or are used for, but, once again, trust me, you will completely forget it after 3 months or a week!

Comments also help transfer knowledge between your team or organization

Sometimes Logic Apps are shared by a team, or you are a consultant creating these resources for your client. They also need to be aware of them. They also need to understand them. You may leave the project or the company in the future, and they will need to continue the work or make future changes. Having a good comment policy in place in the actions is also a way to auto-document your processes.

But sometimes, we may find some of them unnecessary or repeating something already mentioned above, and we want to delete them. So, the main question we want to address on this tip is: How can we delete an existing comment?

So let's assume that we have an existing comment on one of our actions like the one we see in the picture below:

The first reaction we can have to eliminate the comment is to press the X button, as you may see in the video below:

And at the first glint, it seems the X button delete the comment, but in reality, it doesn't! So if you close the designer and open it again, you will see the comment is still there, as you can see in the second video. Or if you click in the … (3 dots) and select Edit Comment, you will see the comment is, once again, still there.

In reality, the X button is just a way to hide the comment – probably Microsoft icon choice was not the best. Instead of an X, they could put a collapse or hidden icon.

But that is another story.

How to delete comments?

To delete an existing comment on one of our actions or triggers is quite simple. However, the delete process seems a bit of a ridiculous process.

To do that, we need to:

  • On our action or trigger, select the … (3 dots), and from the menu, select the Edit comment option.

  • After selecting that option, you will see the comment in edit mode.
    • Note: if the comment is not visible, the comment will appear on the shape in edit mode.

  • To delete the comment, select and delete all text inside the comment textbox – you will see then the label Add a short comment – press enter or click outside the comment textbox to remove the existing comment.
    • Note that spaces are comments.

Do not forget to save the changes, but after that, the comment no longer exists on your Logic App.

Stay tuned for the following Logic Apps Best practices, Tips, and Tricks.

Sandro Pereira

Mar 18, 2022