Referral option

Thank you so much for assistance all these while,

in the explanation i heard,
bonus will be given at sign up.

In my case I want the bonus to be given to "A" when "B" subscribed . Which means it will given in the homepage not sign-in page,.

I stored the data in another firebase DB " Which is "firebase refer" , but when, user "B" homepage is initialized the "firebase refer" did not load correctly, it combined every data on the database instead to download separately.

I believe if it loads correctly in Homepage, I will be able to add bonus to it easily when user "B" pay for subscription.

Check the attached screenshots of the blocks I used.

Thanks.

This is the firebase of the referrals

How did you manage to obscure your block images with an Android screen overlay?

It obscures the all-important event block headers.

Please download and post each of those event block(s)/procedures here ...
(sample video)

Please go into your Firebase data console and post an image of the data contents tree for us to inspect.

  1. Where is your Firebase .GotData event block(s)?

I download the blocks and screenshot to be able to circle the firebase block events, you can see it "firebase refer"

This is the data tree

Tell me how you are using the start value block,
and why.

I did not use any start value, when u used start value in the home page no data was downloaded so I removed the start value and the data came with everything in the database, iam confused please tell me what to do, if you have another idea to do it, to get the data to homepage , Tag and value

Export your .aia file and upload it here.
export_and_upload_aia

Ok.

TWOcards_No2_checkpoint2.aia (7.8 MB)

Herr is it

Hope you got my massage sir

You seem to use buckets of confetti as your database.

I added a multiple database browser Screen to your project to allow browsing the different databases and buckets.

Every single one of them lacked depth.
Capture


Screen_dump_Firebase.aia (7.8 MB)
Somedatabases

I suggest you read the Bus Route tutorial at

and pay special attention how they add '/' to the tags to nest data.

image

Than you very much, I'll try it now , really appreciate

I understand the blocks, but in the block I circled I want the value to come to a text box or label so the i can edit the value in the app. Not in list view.

To do that, you would need to add an event block for the ListView for when an item is selected from the ListView.
Study the ListView blocks and show us how you would handle that event, extracting the tag and value from the ListView Element and putting them into textbox .Texts for editting.

Wow ABG, you are a genius, thanks it work like magic, I've sent you the AIA so pls check how I did it.

Screen_dump_Firebase2.aia (7.8 MB)

But another problem, users can not click and select from multiple databases, the firebase refer IAM using for referral is in index 14, so I want automatic selection on index 14 when the button is clicked.

I want this to be hidden.
Thanks

Don't mistake the diagnostic tool I posted for instruction on how to build an app.

It is meant only to help you see what is going on under the hood and to tweak the stored data for diagnostic and repair purposes.

That would be like an auto mechanic returning a car to a customer with the hood open and wires, hoses, and meters hanging out on the road.

I am not yet convinced that you have a data storage design that fulfills your aims for the app.

Perhaps if you would write a few paragraphs listing your databases, their keys and values, and how they tie together?

Also, show me how you use '/' in your tags to evolve your data from a plain of grass into a forest of trees with branches.

I did not use "/ " anywhere in the database, I used simple and direct firebase database, "store" at the sign-in page and "get" in the app. Just as you've seen in the aia.

I have multiple firebase for deferent purposes, but the most concerned among them is in the fairebase bucket "mobile" firebase tag=moblie, value="moblie number",

fairebase bucket "mobile" firebase tag=refferral, value="reff",

and firebase referral bucket "reff", tag= generate refer code, value= generate code balance variable,

and firebase referral bucket "reff", tag= reff, value= referbalance variable,

I still don't understand your data structure.

Perhaps you could post sample values for three people with two referrals?

Good morning,
It's like I understand what you are trying to tell me, I registered 3 users , 2 with referral code of the first user, but the second reffer replaced the first one.

It does not matter, All I want is to get the 2 firebase buckets to one page.

Or just give me any other better option as the Screen_dump_firebase page you gave .

The "XYZ11234 is the owner of the code

The 33321500... Is the last user of the code but deleted the first user.

Let's say you registered four users, A, B, C, D.
User A referred users B and C.
User C referred user D.

Then the referral tree should look like
(referral database)

  • A
    • B:0
    • C:0
  • C
    • D:0

These are the Firebase tags and values to set to create these branches, leaving Project Bucket set at the base of the tree ...
(tag:value)
JOIN("A", "/", "B") : 0
JOIN("A", "/", "C") : 0
JOIN("C", "/", "D") : 0

Use the blue mutator to add sockets to the text JOIN block.

I can't really understand this explanation, how will I register users, how IAM i going to set up the tree, will I create more text boxes to represent users or when users sign up, will I fix the joint on the fairebase bucket block or how. can you pls show the blocks for more understanding.

Starting yesterday, there is a new Google Sheets component available in AI2.

I suggest switching to that component for your referral table, using the columns I mentioned in an earlier post in this thread.

A table oriented data base is much easier to use than a tag/value database. It has better

  • visibility
  • simplicity
  • clarity
  • filtering capabilities
  • sorting capabilities

The time it takes to switch to Sheets will be dwarfed by the time you spend banging your head against Firebase.

1 Like