I got Invalid Firebase path problem in my blocks

So I'm creating signup for then the data i will got there will be store in Firebase but when i try the apps i got this message:

Invalid Firebase path: [Email_here]. Firebase paths must not contain '.', '#', '$', '[', or ']'
Note: You will not see another error reported for 5 seconds.

Here's my blocks

You cannot use an email address like a firebase tag (dot is not allowed).

If you want to continue to use the email address as a tag, you must do a character replacement on the dot in the email address before storing your tag/value. Use a valid but little used character, e.g. |, so that it is easy to replace that character with a dot again when you actually need the email address back in your app.

So, I changed my method of adding data to Firebase. Instead, I'm using these blocks to add the email or phone number and password. However, the problem now is that I don't know how to check if the email or password has already been used. I tried combining the two blocks I created, but it's not working.
Screenshot 2024-03-05 144125

Do passwords have to be validated as unique? For the email you can do what @TIMAI2 suggested you to use the email as a tag, changing the dot char by other character. This makes it easier to check if the new email is in the tag list.

If not, you would have to retrieve all the email values ​​to compare them with the new email.

How can I implement it? Im new in MIT so can't really do one work without a guide

Wthi this block you can replace the dot by, for example, a pipe:

If you use this like a tag, when a new email must be checked, the you can get the tag with:

and with the received tags here:

you can compare the new email (considering your received tags have not a dot).

I already try this one just now but seems there's an error or did I use it incorrectly?

So when I try it nothing happen it didn't display the anything and didn't add anything in my database.

Here's the blocks:

When you click on Create button, what are you receiving in GotValue (tag & value)?

Where are you setting "ButtonClicked" to 'Create'?

Ohh yeah, I forgot to put set global ButtonClicked clicked. and so for the GotValue
its receiving
Tag: The email address that was used to retrieve the value from Firebase.
Value: The data associated with that email address in the Firebase database.

and when I add the set global Button Clicked in Create button.

I receive this error again.

because when you are calling to StoreValue you continue using the original email (with the dot) instead of the one you have transformed.

1 Like

So in my store value I will change the .Text to global email?

yes. Because as we saw at the beginning, dot cannot be used in tags.

1 Like

It's work bud. Thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.