Search code examples
firebaseapp-inventor

How to remove "/"/"" from data stored in firebase with App Inventor


When adding data with the block call.StorageValue, the string is saved in firebase with "/" before and after the string,

There does not seem to be any block to remove it, How can I do it?

enter image description here


Solution

  • It's a normal firebase function that allows to separate the values and read them as such.

    Example : on Firebase, "\"English-EN\"" is a single value sent from the app as English-EN

    and "[\"863674037411046\",\"863674037411046\",\"863674037411046\",\"863674037411046\"]" is a list of numbers sent as 863674037411046.

    Try to retrieve the value with a button and to a simple label and you should see that it's displayed without the extra characters.

    Source:check my app "harpokrates". I've made it as a firebase DB management demo and it uses nothing else. All values are stored as you describe and are retrieved just fine, without extra symbols or any need to trim the text.

    ps:However if you do have extra symbols at some point, check your use of lists and lists of lists that might generate excessive "\" if you made a mistake somewhere. You can also use the "trim" or "split text" blocks but that would be bad practice. Finding the code error is best.