Search code examples
androidfirebasefirebase-realtime-databaseapp-inventor

Firebase get value error


Afternoon everyone,

I created screen in which the firebase stores the data according to the status of sponsorship (Didn't Approach, Approached +ve,Approched +ve).

Firebase Database

The project saves the data under 4 different project bucket which will have a undefined no of tags (Sponsor Name) each containing a list of 3 values(Name,Branch and Amount)

User Input in this screen - Name, Banch, Name of Sponsor, Status of Sponsorship, Amount

Entry Screen Blocks

The problem arises in the second screen where the entered data is displayed from the firebase. By default I made it to display the data from ProjectBucket "Got"

Here is the blocks for the screen:

View Screen Blocks

The error obtained is:

Runtime Error
The operation insert list item cannot accept the arguments: , [()], [(Arjun M5 1945040)], [(Rockstar (Arjun M5 1945040))]
Note: You will not see another error reported for 5 seconds.

Which corresponds to the value in the firebase at ProjectBucked Got

What I want to do with this screen

  • Have a dropdown list that selects 4 options (4 of the ProjectBucket ie Didn't Approach, Approached +ve,Approched +ve)
  • Display the contents from firebase on the screen (On Labels-Sponsor Name (Tag of the data), Name,Branch,Amount ). There are going to a undefined no of subvalues of each projectbucket (Didn't Approach, Approached +ve,Approched +ve) these subvalues or tags are the Sponsor Name, these along with Name, Branch and Amount have to be displayed for all the entries

Thanks for your time


Solution

  • The operation insert list item cannot accept the arguments: , [()], [(Arjun M5 1945040)], [(Rockstar (Arjun M5 1945040))]
    

    it looks like your global variable Data is an empty string, this should be an empty list... enter image description here

    if you are working with lists, then the valueIfTagNotThere socket should be a create empty list block instead of an empty string ...

    enter image description here