Create a new bookmark under an existing bookmark in the tree

I have a script to search through a time sheet report for the pages without the string "Employee Signature" and to then create new bookmarks under the existing bookmarks in the tree.
So far the script will execute the book marks for the pages in the time sheet report without the string "Employee Signature".
At the last bookmark executed it will insert a new child bookmark before the following console error appears.
this.bookmarkRoot.children[(m + 1)] is undefined
19:Console:Exec
TypeError: this.bookmarkRoot.children[(m + 1)] is undefined
19:Console:Exec
of 128
If someone can please advise where the script is going wrong it will be very much appreciated.  The script is as follows:
var ckWords; // word pair to test
var bFound = false; // logical status of found words
// loop through pages
for (var m = 0; m < this.numPages; m++ ) {
   bFound = false; // set found flag to false
   numWords = this.getPageNumWords(m); // number of words on page
   // loop through the words on page
   for (var j = 0; j < numWords-1; j++) {
      // get word pair to test
      ckWords = this.getPageNthWord(m, j) + ' ' + this.getPageNthWord(m, j + 1); // test words
      // check to see if word pair is 'Employee Signature' string is present
      if ( ckWords == "Employee Signature") {
         bFound = true; // indicate found logical value
         break; // no need to further test for this page
      } // end Employee Signature
   } // end word loop
   // test to see if words not found
   if(bFound == false) {
        var nLastSub = this.bookmarkRoot.children[(m+1)].children.length-1;
        this.bookmarkRoot.children[m+1].children[nLastSub].execute();
this.bookmarkRoot.children[m+1].children[nLastSub].createChild("Employee Signature Reqd", "this.pageNum = " + (m+1));
    } // end not found on page  
} // end page loop
Thank you

I need to place a new bookmark underneath the existing bookmarks for the pages that do not contain the words "employee signature".
I am not sure how to refer to the existing bookmark on those pages.
Tried to revise the script, and now all of the new bookmarks are created underneath all of the existing bookmarks for every page in a continuous loop.
I need a new single bookmark underneath the exisiting bookmarks on the pages that do not contain the words "employee signature".
Can you please help?
var ckWords; // word pair to test
var bFound = false; // logical status of found words
// loop through pages
for (var m = 0; m < this.numPages; m++ ) {
   bFound = false; // set found flag to false
   numWords = this.getPageNumWords(m); // number of words on page
   // loop through the words on page
   for (var j = 0; j < numWords-1; j++) {
      // get word pair to test
      ckWords = this.getPageNthWord(m, j) + ' ' + this.getPageNthWord(m, j + 1); // test words
      // check to see if word pair is 'Employee Signature' string is present
      if ( ckWords == "Employee Signature") {
         bFound = true; // indicate found logical value
         break; // no need to further test for this page
      } // end Employee Signature
   } // end word loop
   // test to see if words not found
   if(bFound == false) {
for (var i=0; i < this.bookmarkRoot.children.length; i++)
        var nLastSub = this.bookmarkRoot.children[i].children.length-1;
        this.bookmarkRoot.children[i].children[nLastSub].execute();
this.bookmarkRoot.children[i].children[nLastSub].createChild("Next Page", "this.pageNum = " + (m+1));
    } // end not found on page  
} // end page loop

Similar Messages

  • Create a new view under a component in IC Webclient UI

    Hi ,
    Can anyone tell how to create a new view under a component in IC Webclient UI.
    Regards,
    Sijo

    Depends what kind of view you are talking about. In any case first go to runtime repository on the left panel of the component and then click the edit button.
    If you are talking about interface view, right click the component interface and choose "Add interface view". The created view is added to the selected window in the runtime repository.
    If you want to add view to the window right click the windows component and select "Add view". 
    Select the view using the f4 help and save the runtime repository.

  • How to Create a new RODC in an existing domain

    Hello everyone,
    Is anybody could help me with DCPROMO install on RODC 2008 R2 ? I wanna join to an Existing forest. "Create a new RODC in an existing domain". If you could write me step by step cmd would be nice.
    Thank's

    by cmd you mean from command promt?
    If, use something like this:
    dcpromo /unattend:c:\ua.txt
    The file should contain at least this info:
    [DCInstall]
    ReplicaOrNewDomain=ReadOnlyReplica
    ReplicaDomainDNSName=my.domain.com
    SiteName=yoursite
    InstallDNS=Yes
    ConfirmGc=Yes
    CreateDNSDelegation=yes
    UserDomain=my.domain.com
    UserName=user
    Password=P"ssword
    SafeModeAdminPassword=P"ssword123
    CriticalReplicationOnly=Yes
    RebootOnCompletion=Yes
    Best Regards,
    Jesper Vindum, Denmark
    Systems Administrator
    Help the forum: Monitor(alert) your threads and vote helpful replies or mark them as answer, if it helps solving your problem.

  • Standard process for creating a new version of an existing report

    Hi All,
    We are using Siebel 8.1 with BI Publisher.
    Does any one know the standard process for creating a new version of an existing report - ie if 'BIP Report XXX' is created and works correctly from the siebel view but then an enhancement is developed, how is the enhancement deployed so that the new version completely replaces the old?
    One suggestion was:
    You can upload a new version of an existing report. You have to navigate to Administration - BIP > Report Template Registration... search for the report you need to replace (I would say that the new rtf file need to have the same name). Now you have to go to the "Template" column where there is the reference to the report file already uploaded but you don't have to click on the link that is displayed you have to click near the link in order to place the cursor on the field then you will be able to see the Multi Value Grup icon .. you click on it and you will be able to upload a new file.
    We have tested this process today, however it is not effective in replacing the old version of the report.
    After carrying out this process (including related steps from bookshelf - ie "click upload files"), we can generate the report from the relevant siebel view and the previous version of the report is still generated.
    Is there a standard process for replacing an existing report that is effective?
    Thanks.

    Hi ,
    This currently seems like a bug , we have encountered this too.
    work around is you have to delete the rtf files from server Siebel\client\temp\XMLP directory and upload them again so that they are not cached any more.
    same on dedicated client you may have to delete relavant files form siebel\client\temp\xmlp directory and upload again.
    Thanks,
    Vamsi

  • How to create a new tab inside a existing subtab on a page.

    Hi,
    How can I create a new tab inside a existing subtab on a page?
    If I change directly on the page.xml it will not maintain compatibility with upgrades. Am I right?
    Thanks,
    Marcelo

    Marcelo,
    Well basically you are adding a stackLayout bean and using that adding your region. Are you able to see the changes and run the page without any error?
    As you are manipulating the file manually, you can never be sure of whether its going to cause issues later on or not. And as mentioned earlier if OAF doesn't support creating the subtab using personalization, there are bound to be some limitations from the framework side. Also what personalization allows is to create items and not regions. So better stick to a rigorous testing to catch any issues early on.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Istore 11.5.10 - creating a new site and assigning existing users to that

    Hi,
    I need to create a new site in iStore and assign all the Canada customers to that site. Can you please let me know how to do this.
    I though that I would create a custom responsibility ABC_IBE_CUSTOMER same as IBE_CUSTOMER and attach that responsibility to the new site and the same responsibility to all the canada custoemers and when they login they will directly been directed to the new site in the customer UI. But it did not happen like that. I might be missing many things inbetween. Can you please let me know the step by step process to achieve this.
    Thanks,
    Srikanth

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Why adobe has not issued an update!!!.
    Agreed. I'm disappointed that no patch has yet been issued. Hope we don't have to go on explaining this for the next 12 months.

  • How to create a new iMovie library from existing events?

    I have had the misfortune of loosing my Mac with all of the data on it BUT fortunately I have kept a copy of all my iMovie events backed up so I've managed to save them.
    Now I have a new iMac and 500Gb+ in the "iMovie Events" folder. I've copied this folder into my Movies folder (in "home" dir) BUT since I didn't also back up the .imovielibrary file I need to create a new library for all these events. The problem I'm facing at the moment is that I'm not sure how to "import" these events in a way that will maintain all/most of the information. I've tried doing the File > Import Media and pointing it to the Movies folder BUT it looked like it was going to import all the files into a single Event, so I chickened out.
    Any suggestions/recommendations? Am I doomed to importing the events one at a time?
    Thanks!

    Looks like I may have found a solution.
    As mentioned above I've copied the "iMovie Events" folder to the place iMovie expects it to be at. And now I've selected: File > Update Projects and Events
    It has recognized that there were a bunch of events that it needed to "process" and has started reading them all.
    It looks like all the events are back, I've not done extensive checking yet, but so far it looks very promising.

  • When i create a new photo album photos are not in the good sequence

    when i create a new photo album photos are not in the good sequence

    Add the photos from your disc to iPhoto, then drag them from the iPhoto Event or photos to the Album.
    You can delete photos from the Album without removing them from the computer.  If you delete them in the Photos or Events area, they are removed from iPhoto, therefore taking them out of the Album.
    The photos have to be in iPhoto to exist in an Album.  They cannot exist in an Album and not be in iPhoto..
    Hope that helps...

  • If I create a new apple ID will I lose all the apps I have purchased with my original ID?

    If I create a new apple ID will I lose all the apps I have purchased with my original ID?

    I set up FaceTime and Messages on four different devices with only one Apple ID. I used the exact method that is described in the video that AnaMusic has provided to you in the link in her response above.  That method worked fine for my family, but you can create new Apple ID's just to use for FaceTime and Messages if you like. Many users prefer doing that as opposed to adding new email addresses.
    IMO - using unique email addresses (like in the video) makes sense, because we (my family) all have different email addresses anyway, and it was very simple to add each family members email address to both apps and remove my Apple ID email address as the contact address on each device.
    BTW .... if you are using your Apple ID on both devices - your phone number should be the number that is showing in the settings - not you daughter's. Did you set up the Apps with your Apple ID?

  • I'm trying to create a new ichat Acc because for some reason the old one is not working, so I go to Create an Apple ID and start creating a new apple ID, when I submit the Acc it tells me that my Email address is already verified for another Apple ID and

    I'm trying to create a new ichat Acc because for some reason the old one is not working, so I go to Create an Apple ID and start creating a new apple ID, when I submit the Acc it tells me that my Email address is already verified for another Apple ID and thats the only email address I have... What can I do?

    There is no way to consolidate iTunes accounts.
    Setting up an iPhone has never required creation of a new Apple ID.
    You've apparently purchased content with both Apple ID's.  Sign into the device with the correct Apple ID and sync the content.

  • I have to create a new iTunes account as I cannot remember the security question answers to my current account, how do I move over my purchases from my current account to my new account?

    I have to create a new iTunes account as I cannot remember the security question answers to my current account, how do I move over my purchases from my current account to my new account?

    fayry wrote:
    ... how do I move over my purchases from my current account to my new account?
    This is not possible...
    Anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID.
    Apple ID FAQs  >  http://support.apple.com/kb/HE37

  • When creating a new window in safari, using command T, the marker have not activated the search field. It means you have to click there every time. Changed after upgrading to Mavericks. Anyone knows how to change this?

    When creating a new window in safari, using command T, the marker have not activated the search field. It means you have to click there every time. Changed after upgrading to Mavericks. Anyone knows how to change this?

    Yes, you can do something like that. What you would do is create a button for each image and then hide them. When I do this type of thing I place all of the buttons on a template page and then hide the template.
    You can then use JavaScript to copy the icon from any of the hidden buttons to the main button that you've set up to display the image. For example, suppose you set up 10 buttons named b1, b2, b3, ...b10. The code to copy the icon from one of them to the button used to display the image (b0) would be something like this:
    // Get the icon from the b3 button
    var oIcon = getField("b3").buttonGetIcon();
    // Get  reference to the b0 button
    var f = getField("b0");
    // Set the icon of the b0 button to the icon retrieved from the hidden button
    f.buttonSetIcon(oIcon);
    // Show the b0 button
    f.display = display.visible;
    This code would go in the Mouse Up event of the smaller button.

  • How to create a new wage type in IT0014 and assign the GL?

    Dear Gurus
    Please guide me about Creating of new wage Type in 14.
    My client wants to add a new wage type says:-1HRR ( Honorarium)  &  assign  the same to  Training Expenses GL account and order number. How to do it. Please guide.
    Regards
    Vikas K Sharma

    To copy a standard WT and assign a new name with the same attributes and characterstics:
    IMG > Personnel Management> Personnel Administration> Payroll data> Recurring Payments and Deductions. Copy any standard Wage Type.
    Check assignment of WT to a Symbolic Account :
    (The WT will inherit the Symbolic account from the copeid standard WT)
    Go through SM30 to Table V_T52EL_NOFM. Make neccessary changes to the Symbolic account, if needed.
    To create a new Symbolic Account and assign it to the WT:
    Payroll --> Payroll (country) --> Posting to Financial Accounting --> Activities in the HR-System --> Employee grouping and symbolic accounts --> Define symbolic accounts
    To assign the WT to the new symbolic account (same as table V_T52EL_NOFM):
    Payroll --> Payroll (country) --> Posting to Financial Accounting --> Activities in the HR-System --> Wage Type Maintenance --> Define WT posting attributes
    To assign a symbolic account to a G/L or Check the assignment of Sym Acc to G/L:
    Payroll --> Payroll (country) --> Posting to Financial Accounting --> Activities in the AC-System -->Account Assignment --> Assign expense accounts.
    Hope this helps.
    Soujanya.

  • I created a new administrator USER account. I deleted the original one but the process never ends. It's been 3 days now.

    I created a new administrator USER account. I deleted the original one but the process never ends. It's been 3 days now. And I can't close preferences window or turn off the computer.
    It's stays in the "deleting" but I can't cancel it or close the window.
    What can I do?

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

  • Can't create a new illustration. Problems occurred while saving the print file.

    I can't open a new Illustrator file. It sends me this error: Can't create a new illustration. Problems occurred while saving the print file. ID:-1
    I opened a previous document created in CC, but it will not allow me to copy and paste items from one doc to another.
    I have rebooted with no avail.
    System:
    Adobe Creative Cloud CC
    Mac Book Pro 2012
    2.6 GHz Intel Core i7
    8 GB 1600 MHz DDR3

    Is a printer connected? Is it turned ON? Is the driver up to date?
    Illustrator checks this every time and also writes information on the printer into the file.

Maybe you are looking for