Question about function

Which Approach is Correct?

I’m analyzing two ways to check if an email is present in the request data in Bubble.io, and I’d like to understand which one is more correct or recommended:

:one: Request Data's email doesn't contain Search for recuperaçãos:first item's email
:two: Request Data's email doesn't contain Search for recuperaçãos:each item's email:first item

The first option seems to check whether the searched email from the database (only the first item returned by the search) is present in the request data.

The second option adds each item's email before first item, which might indicate that it’s dealing with a list of emails before selecting the first one.

My question is: Which of these approaches correctly checks if the request data email is not present in the search?

If anyone has experience with this logic in Bubble.io, could you clarify the difference between the two and suggest the best practice for this type of verification?

The two approaches are very similar, but I’d go with the first approach because in your case you are searching for a specific email address to compare it to only 1 thing (email) Do search for >> email = Request Data's email.

Returning 1 thing:

{
  "email": "email@example.com"
}

vs. if you do each item's email.

[
  {
    "email": "email@example.com"
  }
]

This topic was automatically closed after 70 days. New replies are no longer allowed.