I am making details of order app in which I want that number will automatically generate (sequence wise starting from from ) and the next number should be +1 from last recorded previous number…Please help me in doing this…If possible pls provide blocks for that…
Thankyou
you have to create an column with auto increment
You can use math’s addition block to add 1 with the previous order id. And you will the incremented order id or number.
It is not working please read my previous mssg which will explain you what i really wants
I want when screen initialize that last recorder number +1 result should be seen in label
first fetch all row & get the number of row then added 1
May you post your blocks here??
I have read your topic and then I am telling you to do this with the addition block…
I tried Putting SQL query but that doesn’t work
Sorry for that
@Saksham , You should run this query SELECT COUNT (*) FROM trans;
This query will return you the total no. of rows and then simply you have to add 1 with that and you will get the new id or number
But in this block
this is not getting added
OMG I am shocked. You are using MYSQL and didn’t know this…
@Saksham , my mean is to say that you have to run my query in your database with web and you have to get the result from web. Got Text event. There you will get the total number of rows in csv format.
Web got text>> run query2 Query>> select list item list response content index 2
+ 1
It is not adding 1 the last number is coming with a space thats why it is not able to add . how to remove that space
However , we must be careful if it is allowed to delete records
Max(Namefield)+1 should return the last +1 to you. OK ?
But, depending on the system, some record might have been deleted.
I want, it calls only last number present in list and show +1 to label
I have already answered
List ? Database , Mysql or Sqlite ?