# What on earth am I doing wrong?

**URL:** <https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742>\
**Category:** Questions about Thunkable X\
**Created:** [July 26, 2023, 9:11am UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742 "2023-07-26T09:11:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sammy-wrightcuhb](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sammy-wrightcuhb](https://community.thunkable.com/u/sammy-wrightcuhb)\
**Post date:** [July 26, 2023, 9:11am UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/1 "2023-07-26T09:11:58Z")

</div>

I created this code a few days back. It achieved the desired result of saving information onto my firebase server.  
But now the exact same code (which I have not changed) is suddenly not saving information to the server anymore.

Am I missing something? I seem unable to attach a screenshot so here is an explanation.

I have user click a button and when they do it sets a cloud variable called “join”-text:“/userRegMatch/” & component:“ti\_authorisedViewer’s text” to “list: app variable targetReg”.

It has definitely worked. And I have definitely changed nothing

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 26, 2023, 9:48am UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/2 "2023-07-26T09:48:07Z")

</div>

How old is your Firebase database? After 30 days, it converts and the rules cannot allow open access to your data.

Check your Firebase rules in your Firebase console.

---

<div class="post-metadata">

**Author:** ![sammy-wrightcuhb](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sammy-wrightcuhb](https://community.thunkable.com/u/sammy-wrightcuhb)\
**Post date:** [July 26, 2023, 2:58pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/3 "2023-07-26T14:58:14Z")

</div>

It is older than 30 days. But I have just checked and both read and write are set to true.

I’ve been doing a little troubleshooting: if I call the cloud variable simply “userRegMatch” and set it to component “ti\_authorisedViewer” then it does save this. It even saves it in a list if I ask it to. But it will not allow me to use the join text component to create a subfolder called “ti\_authorisedViewer”.

What I want is to be able to create a folder called “userRegMatch” with a child folder underneath titled whatever is put into component “ti\_authorisedViewer”. Then “ti\_authorisedViewer” becomes the parent folder to a list of registration numbers.

I should mention that there is another variable where I am trying the exact same thing with another folder path and it works fine.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 26, 2023, 3:15pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/4 "2023-07-26T15:15:55Z")

</div>

It sounds like there might be a typo or unexpected variable value that is causing this then. Can you post a screenshot of the blocks that work to join a path and a screenshot of the blocks that do not work to join a path?

---

<div class="post-metadata">

**Author:** ![sammy-wrightcuhb](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sammy-wrightcuhb](https://community.thunkable.com/u/sammy-wrightcuhb)\
**Post date:** [July 26, 2023, 3:18pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/5 "2023-07-26T15:18:04Z")

</div>

I can do. However, I have done a little more troubleshooting: I tried setting a local app variable called “testReg” to the text input component and then displaying a label with text from that variable. It was returning the word “Label” as though I had not entered anything into the text input when of course I had.

---

<div class="post-metadata">

**Author:** ![sammy-wrightcuhb](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sammy-wrightcuhb](https://community.thunkable.com/u/sammy-wrightcuhb)\
**Post date:** [July 26, 2023, 3:28pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/6 "2023-07-26T15:28:31Z")

</div>

The screenshots as requested. The top cloud variable works fine. Bottom one does not

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/b/0bf920bbda474608d0055bbb986d74b5f7c68914.png)

I am leaning heavily toward the fact that something is going wrong between getting test from text input and inserting it into server. Although the top variable gets the correct text so I don’t know.

Ok done a little more fiddling and it seems something is happening with the @ symbol. Can I not use @ symbols in a folder path maybe?

---

<div class="post-metadata">

**Author:** ![sammy-wrightcuhb](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sammy-wrightcuhb](https://community.thunkable.com/u/sammy-wrightcuhb)\
**Post date:** [July 26, 2023, 3:56pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/7 "2023-07-26T15:56:36Z")

</div>

Ok after a lot of digging and searching around I can confirm that Thunkable (or possibly the firebase database) does not like the @ symbol to be used. My limited understanding of technology tells me that this symbol means something that I do not intend it to mean and so the system treats it differently. Whatever the case, when I have removed the @ symbol and used UID instead the variable is acting how I want it to. Now I need to find a way to get the UID of whatever email address is entered into the text input.

---

<div class="post-metadata">

**Author:** ![sammy-wrightcuhb](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sammy-wrightcuhb](https://community.thunkable.com/u/sammy-wrightcuhb)\
**Post date:** [July 26, 2023, 4:50pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/8 "2023-07-26T16:50:49Z")

</div>

Ok I have figured out a way round all of this.  
I think it’s firebase that doesn’t like the @ symbol. In my text input I was identifying authorised viewers by their email address which obviously contains an @ symbol. This can be used in the “value” of the item on the server but not in the “key”.  
I think to get UID associated to an email address I would have to implement some long complicated function which is beyond my capabilities and understanding but also I presume opens up more possibilities for security exploitation.

So my fix was to demand from sign up that users choose a username. Their account can not be created without one. This username is then assigned to their account so whenever they sign in the username is saved into a local variable. If this local variable matches the folder path I have been trying to implement since the beginning then they will be able to see the items I want them to see. But only the items that are registered to that account. Now I need to find a way they can’t just type in a random username after sign up and see someone elses details. But that feels like an easier task than the one I have just had.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 26, 2023, 6:17pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/9 "2023-07-26T18:17:23Z")

</div>

The Sign-In block has a green userId block that is what I use to create unique Firebase paths. See [Email Sign In by Firebase - Thunkable Docs](https://docs.thunkable.com/v/snap-to-place/sign-in-1#sign-in).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [October 24, 2023, 6:17pm UTC](https://community.thunkable.com/t/what-on-earth-am-i-doing-wrong/2520742/10 "2023-10-24T18:17:56Z")

</div>

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