How can I do this like below? (Firebase Complaints System)

I want to make a complaint resolution system with problem id,

I want to make it with firebase,

I set projectBucket to Dashboard and in the projectBucket save mobile number in the mobile number saved Name, Problem, Date and etc

Means Dashboard --> mobileNumber --> Name, Problem, Date and etc.

I am confused in I store Name, Problem, Date and etc in mobileNumber or in problemID which is unique but bulky on firebase.

In mobileNumber it is easy to get complaints of a user by mobile number but in problemID it can not be able to get all by mobile number.

Also I wanted to make any method which stores (Complaint ID, Status_Of_Complaint) and continue in a tag HelpByUser in mobileNumber bucket in Dashboard Parent bucket which contains all helps taken by user, which stores text like this

(Complaint1, Resolved, "resolution given by admin"),
(Complaint2, InProgress),
(Complaint3, Not Resolved, "reason given by admin"),
(Complaint4, InProgress)

Status_Of_Complaint = Resolved, Not Resolved, In Progress

In the admin panel I want all problemID which stored in child bucket mobileNumber.

Means all Status_Of_Complaint with user mobile number and ProblemId and Help or Complaint asked by user,

In a one column or in one item of the customListView

You probably want a structure like this in Firebase:

image

You may need to set up indexing in order to return subsets of the complaints (e.g. resolved/in progress)

e.g.

image

You can use the web component to store a complaint using the POST method, which will generate the time based ID automatically for you.

Firebase | Retrieving Data

I want ID, if 1 is already registered then it will increase is by 1 means next id will be 2,

And what mobile number of a user a projectBucket tag each time means different mobile number means different tags,

In mobile number tags want all complaint registered by that user,

Like he is the user on 4 id of complaint then the id of the complaint will be 4 and if the user is the 124 number of complaint then the id will be 124.

Like 4 is complaint id and 124 is complaint id

1236391037 - mobileNumber
Complaints -

*4 -
Name
Problem
Date
MobileNumber
ProblemId
Status

*124 -
Name
Problem
Date
MobileNumber
ProblemId
Status

1838362926 - other user mobile number(828 is complaint id and 6272 also.)

Complaints -

*828-
Name
Problem
Date
MobileNumber
ProblemId
Status

*6272 -

Name
Problem
Date
MobileNumber
ProblemId
Status

Using my example you can also index on multiple nodes in a node

image

Show me block representation of that method.

I want this kind of data, store and call it in a list by admin user.

Also this is giving me error,

Error saving rules – Line 10: Parse error.

Learn about Firebase data structures, setting and getting data, firebase secure rules, indexing and queries. Learn to think like Firebase (nosql key/values structures) and also consider normalisation of some of the data to make your queries easier.

2 Likes

How can I get this?

@TIMAI2

Please send me some help

As previously indicated, if you are going to use Firebase learn to work with Firebase. There are enough resources in both the community and in the Firebase Documentation to guide you to what you want to do.

Bear in mind that this is an AI2 help community, not a Firebase help community - use StackOverflow for the latter.

1 Like

That's why I am asking here,

As I need to store this kind of data from Ai2 App Inventor

https://ai2.appinventor.mit.edu/reference/components/experimental.html#FirebaseDB

Hey There @HarshVardhanSolanki
I haven't much knowledge but try this aia please use your own firebase db Url

Test.aia (4.6 KB)

i have make a basic structure You can edit it according to you

1 Like

Your way is helping me but you do it in the wrong way.


the value is store and getting in one click, the store tag is storing twice which cannot make the system better with duplicates.

BTW thanks for your kind help.

Ok now you can make your ayatem right?

I am using this above from you but it is not working,
returning value like this below.

use json parsing maybe it will work

Show blocks and after text in firebase

Tim I tried again and again but cannot be able to found any solution, please help me :sob::sob:

i've used JSON Parsing method but still the value is saved in json format