Split Number

102 views
Skip to first unread message

Loama Dyrein

unread,
Oct 19, 2019, 12:55:58 PM10/19/19
to MIT App Inventor Forum
Hello all,

How can I split number from letter in csv
Thank you.
split.csv
blocks (2).png

TimAI2

unread,
Oct 19, 2019, 1:00:23 PM10/19/19
to MIT App Inventor Forum
Use the "split at first" block

and split your csv at ". "   (dot space)

Loama Dyrein

unread,
Oct 19, 2019, 1:22:53 PM10/19/19
to MIT App Inventor Forum
Thank you Tim for reply.
Can you please explain in some detail.

Taifun

unread,
Oct 19, 2019, 1:25:49 PM10/19/19
to MIT App Inventor Forum
what about first trying something yourself?


Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.        

Loama Dyrein

unread,
Oct 19, 2019, 1:34:54 PM10/19/19
to MIT App Inventor Forum
Is there any example in .aia?
Thank you

Taifun

unread,
Oct 19, 2019, 3:10:46 PM10/19/19
to MIT App Inventor Forum
it looks like it probably would be a good idea to do some tutorials to learn the basics?

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn  App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         



Loama Dyrein

unread,
Oct 20, 2019, 1:01:36 AM10/20/19
to MIT App Inventor Forum
I need to get value of number after split the number from letters.
Please guide me how to do it.
Thank you all.

Loama Dyrein

unread,
Oct 20, 2019, 4:17:21 AM10/20/19
to MIT App Inventor Forum
Hi All,

I have tried but I couldn't get value of number for every row after split number from letters.
I just need to get only value of number for example:
Row number 1 :   return value is 1
Row number 2 :   return value is 2
..
..
..
..
Row number 100 :   return value is 100

TimAI2

unread,
Oct 20, 2019, 5:53:54 AM10/20/19
to MIT App Inventor Forum
example to show how it could be done - uses your original split.csv file
splitcsvfornumber.aia

Loama Dyrein

unread,
Oct 20, 2019, 6:49:28 AM10/20/19
to MIT App Inventor Forum
Thank you so much Tim for help. It works fine.

Have a nice day!

Loama Dyrein

unread,
Oct 20, 2019, 10:13:21 AM10/20/19
to MIT App Inventor Forum
Hi Tim,
I have made some changes because I need to view the contents of csv and then it returns the value number of selected item from List picker.
Can you please help me to do it.

TimAI2

unread,
Oct 20, 2019, 10:31:50 AM10/20/19
to MIT App Inventor Forum
Try this.

I used a listview so you can scroll through the items, the on selection is returns the number and the file separately (in a label)
splitcsvfornumberrevised1.aia

Loama Dyrein

unread,
Oct 20, 2019, 10:46:29 AM10/20/19
to MIT App Inventor Forum
Thank you so much Tim for giving me a chance to help me.

Good luck and best wishes.

Loama Dyrein

unread,
Oct 20, 2019, 2:28:28 PM10/20/19
to MIT App Inventor Forum
Hi Tim,

I need to find a name from ListView because before it was easy by using list picker.

Now I am trying hard but I don't know how to do it. Please help me.
I am so sorry to take a lot of your time on this project.

For example when I want to find the Picalfatyem, I just write Picalfatyem in Text Box and return the two value :

Number      1
Name         Picalfatyem


split.csv

TimAI2

unread,
Oct 20, 2019, 4:16:44 PM10/20/19
to MIT App Inventor Forum
Add a filterbar to the listview/listpicker (in designer) if you want to type
However this may change the indexing which will mean re-working the list logic

Loama Dyrein

unread,
Oct 20, 2019, 10:17:42 PM10/20/19
to MIT App Inventor Forum
Hi Tim,

I added filter bar to the list view but it return wrong values.

TimAI2

unread,
Oct 21, 2019, 4:13:20 AM10/21/19
to MIT App Inventor Forum
As I said, using the filterbar upsets the indexing.

Given you have changed what you want to do three times already I suggest
you decide what it is you want to do with your csv file data, then return here, clearly write out
the workflow of your project, and we can see what we can do to help....

Loama Dyrein

unread,
Oct 21, 2019, 8:05:10 AM10/21/19
to MIT App Inventor Forum
Hi Tim,

I promise you that this is last change. I am so sorry to bother you too much.
I just delete the space in between names and add comas between names and number to be easy for view and return value. And also filterbar for entering names then return name and number.
I appreciate you for hard job.

Please give me only one last chance.:)

Thank you.

split.csv
blocks (3).png

TimAI2

unread,
Oct 21, 2019, 10:32:08 AM10/21/19
to MIT App Inventor Forum
How about this?
splitcsvfornumberrevised2.aia

Loama Dyrein

unread,
Oct 21, 2019, 1:57:09 PM10/21/19
to MIT App Inventor Forum
Thank you so much Tim for all of your effort and support to finish this project.


Good luck:)
Message has been deleted

Loama Dyrein

unread,
Oct 21, 2019, 2:33:24 PM10/21/19
to MIT App Inventor Forum

Hi Tim,

I have added one more column after comma in the .csv that should not viewed in the Listview nor in return value. I need to use it for another thing in same project.

Number   Name.csv,      New Column:

1. Pic alfatyem.csv,1eyDCxgIgNuOxEr3HmoNhnHSdfjzlcd


Please guide me how to do it if you don't mind.
split.csv

TimAI2

unread,
Oct 22, 2019, 4:54:24 AM10/22/19
to MIT App Inventor Forum
" I promise you that this is last change. "   ???  ;)

See attached project file

You will find the converted list in the variable fullList

Number, Filename, FileID
splitcsvfornumberrevised3.aia

Loama Dyrein

unread,
Oct 22, 2019, 6:34:09 AM10/22/19
to MIT App Inventor Forum
Hi Tim,
First of all thank too much for helping me in order to continue finishing this project. 

Second thing, I am so sorry that I promised you that it was last change then asking again you because I didn't put the third column under consideration.

Good luck and best wishes:)
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages