This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sample_code:count_list-items [2014/12/17 15:52] octazid created |
sample_code:count_list-items [2016/07/28 19:10] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Count the List Items====== | + | ====== Count the List-Items ====== |
+ | |||
+ | **obsolete: | ||
+ | |||
+ | (Sample Code taken from the DroidScript Google-Group) | ||
+ | <code JavaScript list_item_count.js> | ||
+ | function GetListItemCount( list ) | ||
+ | { | ||
+ | //Get a comma separated string of items from the list | ||
+ | var itemString = list.GetList( "," | ||
+ | |||
+ | //Split the comma separated item string into an array of items | ||
+ | var itemArray = itemString.split( "," | ||
+ | |||
+ | return itemArray.length; | ||
+ | } | ||
+ | </ |