How can I get a number of items from a group

I'm trying to load assets into a library. Most of the assets are groups. I'd like to label each asset with number of items from that specific group.
Here is my code:
var d=app.activeDocument;
//create empty library
var library = app.libraries.add(File('mylibrary.indl'));
for(myCounter = 0; myCounter < d.pages.length; myCounter ++){
    if(d.pages[myCounter].groups.length > 0){
         //how do I get number of items from a group?
         var item_count = ?????
    }else{
         var item_count = '1';
    library.store(d.pages[myCounter].allPageItems);
    library.assets[0].name=item_count;
Thanks for your help and Happy New Year!!!

I figured it out!!!
Here is the solve that worked for me:
var elems = d.pages[myCounter].groups[0].pageItems.everyItem().getElements();
var item_count = elems.length;

Similar Messages

  • How can I get Notification Number from Material Document?

    Can you please tell me that how can I get Notificatin Number(QMEL-QMNUM) from Material Document(MSEG-BELNR)?
    Regards,
    Subhasish

    This question is closed but unanswered.

  • HT201359 How can I get an iTunes  purchased item invoice ?

    How can I get an iTunes  purchased item invoice ?

    Hi Mikih,
    If you need to get a copy of your iTunes Store purchase history, you may find the following article helpful:
    iTunes Store: See your purchase history and web order numbers
    http://support.apple.com/kb/ht2727
    Regards,
    - Brenden

  • I have an iphone4 and my husband merge his numbers with mine and i think it was deleted can you tell me how can he get his number back on his phone

    have an iphone4 and my husband merge his numbers with mine and i think it was deleted can you tell me how can he get his number back on his phone

    Do you possibly mean the contacts have been merged?
    If so, where are each of you syncing contacts?  A supported application on the computer? iCloud or another cloud service? An Exchange server?
    WIthout details, it's difficult to offer specific resolutions.

  • How can i get back my purchased items after a hard drive and iphone failure?

    My itunes was loaded on my parents computer and the hard drive crashed. I didnt get round to backing up to my laptop and then my iphone crashed and removed everything. How can i get back my purchased items?

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How can I get the number of missed messages to pop up on my message icon like the would if i missed a call

    How can I get the number of missed messages to pop up on my message icon like the would if i missed a call

    Hi,
    Go to Settings>Notifications Center>Messages, and make sure the Badge App Icon is turned ON.
    Cheers,
    GB

  • Urgent******how can i get the number of rows enterd by the user in a table

    Hi Frndz..
    As per my requirement i need to do the validations for the multipple rows in a table that was enterd by the user,
                   T
              The prob is how can i get that number of rows that enterd by user,
           WDMessageManager msg = wdComponentAPI.getMessageManager();
         String col1= "";
         String col2= "";
         double col3= 0;
         double col4= 0;
         double amount= 0;
         int nodesize = wdContext.nodeTest().size();
         try
         for(int i=0; i<=2 ; i++)
                   col1 = wdContext.nodeTest().getTestElementAt(i).getCol1();
                 //msg.reportSuccess("col1 size is :"+col1);
                   col2 = wdContext.nodeTest().getTestElementAt(i).getCol2();
                   col3 = wdContext.nodeTest().getTestElementAt(i).getCol3();
                   col4 = wdContext.nodeTest().getTestElementAt(i).getCol4();
                    amount = wdContext.nodeTest().getTestElementAt(i).getAmount();
              if(col1 == "" )
                        msg.reportException("Plz fil the col1 for line:",true);
                   break;
              else
              if(col2 == "" )
                                  msg.reportException("Plz fil the col2 for line:",true);
                             break;
                        else
              if(col3 <= 0)
                   msg.reportException("Plz fil the col3:",true);
                   break;
              else
                   if(col4 <= 0)
                   msg.reportException("Plz fil the col4:",true);
                   break;
              msg.reportSuccess("skvgjhdfgasdfgsjkafguisafisenvtvyeriy");
                                                       wdThis.test();
         catch (Exception e)
                   msg.reportException("strMessage in catch block",true);
         this is the code am going
    Regards
    Rajesh

    Hi,
       You can try this:
    * Let's say the table's datasource is a node called Table  and it has two attributes first & second.
    * You want to check if any of these attributes has been changed by the user or not. If they have been
    * changed then you want to do some validations against them.
      int sizeOfTable = wdContext.nodeTable().size();
      for(int i = 0; i < sizeOfTable; i++){
         IPrivate<view name>.ITableElement ele = wdContext.nodeTable().getTableElementAt(i);
         if(ele.isChangedByClient(ITableElement.<attribute name>)){
            //value has been changed, do some validation. You can get the row index using ele.index().
    Regards,
    Satyajit.

  • How can i get a number of working days in a month PL/SQL

    How can i get a number of working days in a month(excluding Saturday and Sunday) in a query in PL/SQL ?

    Please do a search before posting
    sql>
    select count(*)
    from(
    select trunc(sysdate,'month')+rownum-1 dy
    from all_objects
    where rownum <= last_day(sysdate) - trunc(sysdate,'month')+1)
    where to_char(dy,'fmday') not in ('sunday','saturday');
    COUNT(*) 
    23
    Message was edited by:
            jeneesh
    Please try yourself to change the query to one that doesn't use a subquery..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can i get serial number on my photoshop from creative cloud

    how can I get serial number on my photoshop from creative cloud

    Creative Cloud applications aren’t licensed with a serial number, they are licensed by logging into CC.

  • How can i get iban number in transaction FDTA

    Hi Abaper,
    How can i get iban number in transaction FDTA ?
    Thanks in advance.
    Regards,
    Sourav

    This is a bit past the last activity of the thread, but I just had an idea, that requires me to get the port number in the init.
    When this particular servlet shuts down, it generates an email. Since there is more than one instance running, I figured, I would put the HOST and PORT in the email.
    The problem with saving this information from a request, is say it gets shutdown before any requests are generated.
    The email then would have the HOST portion, but the port would be null.
    Ideally there would be a way to get the port(s) that the server is listening on.
    Thanks,
    Brent Parsons

  • HT2729 I have limited space on my new ipad. How can I limit the number of songs from my itunes on my imac from going to my ipad when I connect the two?

    I have limited space on my new ipad. How can I limit the number of songs from my itunes on my imac from going to my ipad when I connect the two?

    you can do this by keeping the external hard drive connected and doing the following
    -hold shift key down on computer while opening iTunes and a prompt will appear to choose a library
    -select choose library, iTunes should bring up your explorer windows where you can search for the external HD
    -after you find the external HD find the iTunes folder you just copied to it
    -after opening the iTunes folder look for the file that says iTunes library.itl or if you can't see that extenstion just look for a document looking thing in the iTunes folder that shows up as a database file
    -double click the database file and boom iTunes should load your library without having to copy it to the computer
    PS: do make sure that if you are going to do it this way, make sure that the external HD is connected at all times, because if you don't then you will get exclamation marks next to your iTunes songs
    double PS: if you are unsure how to find out if the iTunes library file is a database file just right click it and choose properties and under the type it should say database file
    hope this helps:)

  • Help Please! How can i get rid of shopper pro from my google chrome browser?

    Help Please! How can i get rid of shopper pro from my google chrome browser?

    Read this document about malware and adware.   The solution is almost certainly within.The Safe Mac
    http://www.adwaremedic.com/index.php
    Incidentally, it would help if you entered details of your products in your profile.   There are different answers for different items with this question.

  • I have about 800 more songs on my nano than itunes, due to a crash. How can I get the songs onto itunes from the ipod, or at least get the new music ive gotten since the crash onto my ipod without deleting all the other songs when it syncs?

    i have about 800 more songs on my nano than itunes, due to a crash. How can I get the songs onto itunes from the ipod, or at least get the new music ive gotten since the crash onto my ipod without deleting all the other songs when it syncs?

    It has always been very basic to always maintain a backup copy of your computer for just such an occasion.  Use your backup copy to put everything back.
    If you have failed to bakup, then you can transfer itunes purchases from an ipod: File>Transfer Purchases

  • When I try using Airplay to stream from Amazon Prime it tries to use Apple TV music.  How can I get it it stream movies from Amazon Prime?

    When I try using Airplay to stream from Amazon Prime it tries to use Apple TV music.  How can I get it it stream movies from Amazon Prime?

    Welcome to the Apple Community.
    Try the following steps, check whether things are working after each step where appropriate, before trying the next.
    Restart the Apple TV (Settings > General > Restart).
    Restart the Apple TV by removing ALL the cables for 30 seconds.
    Restart your router.
    Reset the Apple TV (Settings > General > Reset > Reset all settings)
    Restore the Apple TV (Settings > General > Reset > Restore)

  • My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    I use my iPad to get the address book backed up by iCloud from my iPhone. However, I cannot see the recent new contacts from my iPad. Is there anyway to check the iCloud server to see if my address book backup from my iPhone is still there?

Maybe you are looking for

  • Error using multiple subqueries in a from statement - sorry so long

    From the query below, my results should only be 3 rows but, for whatever reason, I'm getting 3 of each operation number. Can someone PLEASE tell me why this is looking more than once? Version - Oracle 9i Here's the query select base.equivalent_operat

  • How to Install 10gR2 from db 9.2.0.5 - 11i upgrade purpose

    Hello, I have downloaded database 10.2.0.1.0 to upgrade from 9.2.0.5 which is not supporting my OS (Oracle Linux 5.7 32bit) and I tried to install patch set 9.2.0.8.0 in top of 9.2.0.5.0 which is also not supported. 1.Where i need to download databas

  • Message from iSQL*Plus team

    This forum is for iSQL*Plus, the web-based interface to SQL*Plus. The iSQL*Plus development team will monitor this forum on a best effort basis, and help you with any problems or questions you might have. If you find any bugs, this is the place to te

  • Loader Does not work

    my Loader Does Not Work. i am create loader with animation. total animation are build a 100 frame.code should be write but loader does not work .Please help................

  • Scheduling Agreement Pricing Procedure

    I cannot understand how the pricing procedure picked in scheduling agreement, I know pricing procedure for PO picked from caluculation schema and schema determination can any one explain me complete process to assign pricing procedure to scheduling a