# How to Check whether There is Existing Data before Allowing Users to Insert the Data to the Database

**URL:** <https://discourse.nodered.org/t/how-to-check-whether-there-is-existing-data-before-allowing-users-to-insert-the-data-to-the-database/1754>\
**Category:** Dashboard\
**Created:** [23 July 2018 02:10 UTC](https://discourse.nodered.org/t/how-to-check-whether-there-is-existing-data-before-allowing-users-to-insert-the-data-to-the-database/1754 "2018-07-23T02:10:23Z")\
**Posts on this page:** 1\
**Showing post:** 40

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 August 2022 19:34 UTC](https://discourse.nodered.org/t/how-to-check-whether-there-is-existing-data-before-allowing-users-to-insert-the-data-to-the-database/1754/40 "2022-08-24T19:34:45Z")

</div>

In order to make flow or code importable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

However, if the problem is that you are having difficulty getting the right query, and you are creating the query in a function node, then just post the code of the function node, and show us what is going _into_ the function node, and what is coming out of it. There is no need to post a large flow.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-check-whether-there-is-existing-data-before-allowing-users-to-insert-the-data-to-the-database/1754)._
