Hello, I’m having a problem when I return a value from firebase and want to add up with a value that is already in the error application. I believe it is because it is returning the number along with relatives (2) as I remove this parenthesis and leave 2.
Actually those means that this is a list.So you can select items from them using select list item block.So can you show as your blocks?
You can’t add strings.Only numbers can be added.If you want to join them use join block
Label 6 is a number, I’m doing a points system. the value of qr code is a number I wanted to sum qr code value plus label value 6
@Ficher_TM use string operation replace to remove parentheses.
Or
Make a list with the data received and then use the item of the list.
can you show me how do I remove the parentheses?
Use replace all block. in the text category.
you can use one of these two methods to remove parenthesis:
1- if the value from Firebase Got Value event is in form of a list you can use select list item block to remove the parenthesis.
- feed select list item block the value variable from Firebase Got Value event as the list and with number 1 as the index input.
2- if the value from Firebase Got Value event is in form of a text you can use segment block to remove the parenthesis.
- feed segment block the value variable from Firbase Got Value event as the text input and with number 2 as the start input and the length of your value variable minus number 2 as the length input.
be aware that if **value** variable is a list with more than item method 2 will not work and you have to use **select list item**.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.