Alan Lee

Dec 14, 2018, 10:17:30 PM12/14/18
to MIT App Inventor Forum

I try to design a grade judgment app, for example, when the textbox key in the grade 34,click the button, 

then the label show the ”A high school .”


I know I could design the app with “ if-else ”, but my high school’s amount are many(above 100).


Can I use the list or csv, decrease the use of “if-else”

螢幕快照 2018-12-15 上午11.16.30.png


Chris Ward

Dec 14, 2018, 11:07:07 PM12/14/18
to MIT App Inventor Forum
Hello Alan

It's not apparent from your image as to where you would be using an excessive amount of 'If else'. 

If you need to process a number of TextBoxes, you can use the "Any Component" method, but a list of those components needs to be initialized first.

So, in short, I don't understand what you are trying to do - in this case, the picture did not "paint a thousand words". Perhaps you could give us more information i.e. where the data comes from and how the App should process it.

Hossein Amerkashi

Dec 15, 2018, 9:41:33 AM12/15/18
to MIT App Inventor Forum


Dec 15, 2018, 9:08:00 PM12/15/18
to MIT App Inventor Forum

Rudolph Karstadt

Dec 17, 2018, 10:34:28 PM12/17/18
to MIT App Inventor Forum
I'm not quite sure I understood your problem.

I show you a solution with a list, a textbox, a button and a label

type in your grade in the textbox then press the button and the label will show you the HighSchool letter


Reply all
Reply to author
0 new messages