How to use start value with multiple Data

question

(Ts) #1

Hi Friends I’m making an app that I’m using two screens

i have added two buttons at screen1,
example
1.Button1 Google
2.Button2 Facebook
when button1 click then open “screen2” with startValue Google &
button2 click then open “screen2” with startValue Facebook

I have been opening two websites in the screen2 with the startValue

Now my question is
When I click button1 the screen2 will open
When I click button2 the screen2 will open

I want the when screen2 value taken from button1 so lable text change to Google &
When screen2 value taken from button2 so lable text change to Facebook

how can i this tell me please



(Yusuf Cihan) #2

Just click “New Screen” button and type name of screen.


(Nikhil27B YT) #3

bro check this aia its helps to you
AIA
testgooglefacebook.aia (2.0 KB)

APK
testgooglefacebook.apk (4.3 MB)


(walya_express) #4

Very easy

Blocks​:point_down:

First use " make a list " then insert your data via text string block

Check this 100% working method :blush:

Now in next screen


(Ts) #5

This post was flagged by the community and is temporarily hidden.


#6

Change the 3 to 2. The error says it all. The list has 2 items not 3.


(walya_express) #7

Your number of list is not 3 bro. First make 3 list for 3 integer index. If you will create the it will automatically load 3rd position of list.


(Ts) #8

i know bro, From your first answer I understood this
But still this error is showing,
You can see the block if there broblem so tell me
first screen


Second screen


#9

I guess you don’t understand the concept of lists. I gave you the answer already.

Read this and learn
http://www.appinventor.org/bookChapters/chapter19.pdf


(David Ningthoujam) #10

it works perfectly for me. im sending a list of airtable data to another screen.


(Yusuf Cihan) #11

You are trying to get 3rd item of list, but your list has 2 elements. In first picture, click gear icon of blue list block and add another element, so you will able to add one more element to your list.

If you need only 2 item, then select 2nd item of list, instead of 3 in second screen’s blocks