2016년 11월 16일 수요일

Intermittent error message when saving barcode number of format AG000#####


I am try to create an inentory app for my  job that selects a room from a floor plan by touching a sprite ball placed over the floor plan in Screen one, Pass this room number to Screen2  displayed above.  that part works fine.

This section should auto fill the room number based on passed value
hit scan button to scan the items barcode
when you hit save button ck if i had allready entered that barcode if i have not update the database and clear the  text boxes for next scan

the Export CSV seems to work fine 

Sometimes it works flawlessly but sometimes it gives me Error Bad argument on is in list cannot accept  argument [AG000#####] [AG000###2]

what am i missing?
ok noticed that why i save before moving to another room the output file is ok when i select another room and try to save is when the issue occurs and the program crashes could this have to do with the size of the file?  is 5.03MB before i start collecting data?

-- 
see the following tips and in your case especially #1

1. switch screens correctly The recommended method of switching screens in AppInventor

2. follow these recommendations Using Images with App Inventor

3. avoid redundancy
probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

4. reuse your components, see also Building apps with many screens and https://groups.google.com/forum/#!msg/mitappinventortest/YBAfURWv-tY/Ivqx6XcmDgAJ

5. How to overcome the App Inventor project limit of 10 MB

6. Backup your project frequently, see also http://twodogapps.com/?page_id=686#BackupWork

Taifun

Trying to push the limits of App InventorSnippetsTutorials and Extensions from Pura Vida Apps by Taifun. 

-- 
I see you keep a list of rooms and a list of bar codes.

Does your job require you to keep track of which bar codes are in which rooms?
Your design won't accommodate that.

If that's a problem, see the Book Collection TinyDB sample in this FAQ:

ABG



-- 
Yes i need to keep track of which barcode is in which room.  i will look at the reference.  I also cound not figure out how to export it in to csv without two tables.

I can what i need with the barcode as the tag and then the room as the value  but could not get it to export as csv correctlry.

thanks for the help i will ck out the references given.

-- 

Can a bar code be in multiple rooms?

That affects the design of the data storage.


ABG

-- 
 I also cound not figure out how to export it in to csv without two tables.

You may need three tables:

A 1 dimensional list of the room numbers

A 1 dimensional list of the bar codes

A 2 dimensional table (list of lists) of the bar code stock by room:
  each row would contain 3 fields,
   room,
   bar code,
   count of items with that bar code in that room.

Three tables are needed because you might have rooms with nothing in them,
and bar codes for items that aren't in stock anywhere.

See the csv to/from table blocks for import/export .

It wouldn't hurt you to do some tutorials and read some book chapters

ABG

--
Thank you Abraham... no the barcode is only in one room its a unique item... i have done the tutorials  and have read 3 or more books on the subject but obviously not getting the concept . Basically i have barcode that i want to associate to a room .  Each room may have multiple unique barcodes but each barcode can only exist in one room.

I think i may be able to do it using the book example you suggested.

thanks


-- 
 no the barcode is only in one room its a unique item

That tells me you can use the bar code as a TinyDB tag with the room as its value.

See my TinyDB_export_import sample for how to create a big csv text from a set of TinyDB tag/value pairs.

ABG

Also, I did not see in this thread where you mentioned how many people need to access this data from how many devices.
If either answer is more than one, you will need a Web based data base like Fusion Tables.
ABG



-- 
Abraham... my app works fine now ... most of the issues seemed to have been typos ... cant see the forest for the trees.  thanks for all your help... this app is for personal use at work to simplify our yearly equipment inventory... where i was handed 25 pages of numbers  this way i just walk room to room and scan  everything and sit at my office and compare to the paper list that has no way to extract electronic data.

thanks for all the suggestions... it expanded my knowledge.


-- 

댓글 없음:

댓글 쓰기