Using the bookmark names to create custom stamps

Hi all

I am a VB programmer who is faced with a task in JS.  I'm trying to do 1 of 2 things: I would prefer #2.

1. create a custom stamp by using the file name.

or

2. create a custom stamp using the name of the bookmark (which in turn will be the file name)

I was foooling around during a certain number of hours trying to get this to work, here's what I've done so far:

I created a stamp, the stamp has two text boxes I need to fill from a string. The string is in the format of
"08363-G-5109-DWG-R-00001_A.pdf" with a variable number of characters before underscore, but still the same after the underscore. In the first text box, that I need
08363-G-5109-DWG-R-00001 that I get with

Code:
Event.Value = event.source.source.documentFileName.slice (0, -6); This excellent work. The second box should contain the letters that lie between the '_' and '.pdf' and everything I have tried does not produce a result.

I focused most of my time trying to separate the file name, thinking that the same logic apply to bookmarks.

Things I've tried:

[CODE]

var str = event.source.source.documentfilename;

strt var = str.lastindexof ("_");

var end = str.lastindexof(".");

Event.Value = str.substring (strt, end);

and

var arrStr = event.source.source.documentfilename.split ("_");  ' * Harcoding = "08363-G-5109-DWG-R-00001_A.pdf" works *.

var arrstr2 = arrStr [1].split(".");                                             "But is not very dynamic

Event.Value = arrstr2 [0];

and

var str = event.source.source.documentfilename;

var arrStr = str.split ("_");

var arrstr2 = arrStr [1].split(".");

Event.Value = arrstr2 [0];

[/ CODE]

Any help would be greatly appreciated!

Bent

Note that JavaScript is case sensitive, so is not "documentfilename". You have it right in the first script you show.

Tags: Acrobat

Similar Questions

  • Create the user by using the API OIM11g R2 with custom attributes

    Friends,

    I am trying to create a user using API in OIM 11 g 2 with a custom attribute.

    < String, Object > HashMap createUserMap = new HashMap < String, Object > ();
    createUserMap.put (UserManagerConstants.AttributeName.FIRSTNAME.getId (), "Test);
    createUserMap.put (UserManagerConstants.AttributeName.LASTNAME.getId (), "tester);
    createUserMap.put (UserManagerConstants.AttributeName.USER_LOGIN.getId (), "tester1");
    createUserMap.put (UserManagerConstants.AttributeName.USERTYPE.getId (), "End user");
    createUserMap.put (UserManagerConstants.AttributeName.EMPTYPE.getId (), "EMP");
    createUserMap.put (UserManagerConstants.AttributeName.PASSWORD.getId (), "Welcome1);
    createUserMap.put (UserManagerConstants.AttributeName.EMAIL.getId (), "[email protected]");
    createUserMap.put ("act_key", new Long("1"));
    createUserMap.put ("USR_UDF_DEPTNO", "10");

    Try
    {
    UserManager userService = oimClient.getService (UserManager.class);

    User user = new User (userLogin, createUserMap);
    Result = userService.create (user) UserManagerResult;
    System.out.println ("State of creation: '" + result.getStatus ());
    }
    catch (System.Exception e)
    {
    e.printStackTrace ();
    }

    But it fails with the error below.
    Create a user application cannot set or change the USR_UDF_DEPTNO attribute, since it is not defined in the corresponding dataset. : create user: USR_UDF_DEPTNO. *

    But this attribute exists in the IOM and I was able to create the user using the user interface with this custom attribute.

    Please let me know what I am doing wrong.

    You must pass a long time don't value not int. It should be that way.

    Long deptno = 1234;
    createUserMap.put ("deptno", deptno);

  • using the group name and password group in client anyconnect

    Hello. Is it possible to use the group name/password of the legacy in customer cisco anyconnect vpn client? I checked the AnyConnect Administrator's Guide ' VPN XML Reference"and found nothing on this subject.

    It's true.

    AnyConnect Secure Mobility Client (VPN Module) can be used to connect to both types of VPN remote access:

    1. full SSL VPN tunnel

    2 IKEv2 VPN IPsec.

    The legacy VPN client is used only with the old IKEv1 IPsec VPN and you cannot use this type of VPN client AnyConnect.

  • Reader 9.3.2 crashes when you use the bookmarks search &amp; close pane

    I have some PDF files created using the Bookmarks pane left unresolved - that is to say the Bookmarks pane is open whenever I open the file. This means that the display of the actual page is too small to read.  I can close the Favorites bar and everything is OK.

    However, I use the index search function a lot - I have an .idx indexing file a bunch of PDF files, and I have search in PDF files with this index.

    If I search something, then select a search link, the file opens with the shutter open bookmarks.  If I close the Bookmarks pane after searching a something * kaboom *.  Player crashes.

    BTW, it also blocks if I resize the window - so I can't even increase the size of the page without closing the Bookmarks pane.

    I'll see if a co-worker can use his copy of Acrobat Pro to edit the files, close the Bookmarks pane and re-save the files.  But in the meantime, this is a very annoying bug.

    Works on Vista Home Premium SP2 32-bit.

    Open the drive, go to Edition-->--> Documents Preferences and select "Restore last display settings when reopening documents."

    So now when you reopen the PDF with bookmarks bar you have closed earlier after checking this option, you will see the bookmarks bar is closed.

  • Functions the discoverer of the elements using the full name?

    Hello everyone,

    I had a problem today using the discoverer administrator, while creating an element using a Trim function on the element used in the condition of the reports, when I check the SQL code, it uses the fully qualified name that is SYS. STANDARD. Trim (Item) instead of just the TRIM (ITEM) which makes a huge difference in the duration of the query.

    For example:

    Items in the folder:
    CHECK_CODE1, CHECK_CODE2, CHECK_CODE3

    New item you want:
    ALLCHECKCODES = TRIM (CHECK_CODE1) | » _'|| TRIM (CHECK_CODE2) | » _'|| TRIM (CHECK_CODE3)

    Condition:
    ALLCHECKCODES LIKE '% 1234% '

    This is the Sql that is generated:

    Select...
    Of
    < table_name >
    where
    SYS. STANDARD. TRIM (CHECK_CODE1) | » _'|| SYS. STANDARD. TRIM (CHECK_CODE2) | » _'|| SYS. STANDARD. TRIM (CHECK_CODE3) LIKE '% 1234% ';

    With the creation of element when I create a condition using the Trim function it is displayed correctly:

    ... where
    TRIM (CHECK_CODE1) | » _'|| TRIM (CHECK_CODE2) | » _'|| TRIM (CHECK_CODE3) LIKE '% 1234% ';

    Is it possible that we delimit the Discoverer administrator to build the regular element using Trim instead of the fully qualified name for the function?

    Enjoy your entries and your advice.

    Thank you.

    Vlaminck

    Hello

    The problem is that the TRIM does not use the syntax of the standard setting and therefore normally does not appear in the EUL. If the PAD has been imported into the EUL then you might find the TRIM function in Disco administrator under Save the PL/SQL functions and then remove the SYS and the STANDARD of the owner and package.

    Otherwise, I should just use LTRIM (RTRIM (.)) like LTRIM and RTRIM use the normal parameter syntax.

    Rod West

  • Using the bookmark Library, I can locate specific bookmarks, but there is no way of knowing which of my cases, it is in. Is it possible to do this?

    Using the bookmark Library, I can locate specific bookmarks, but there is no way of knowing which of my cases, it is in. Is it possible to do this? I have about 15 cases of bookmarks with a total of about 150 bookmarks. The research of the Library bookmark gives good results insofar as find the specific bookmark, but I IN. WANT to KNOW WHO MY RECORDS THE SPECIFIC BOOKMARK IS how can I do this?

    Take a look on these modules:

    https://addons.Mozilla.org/en-us/Firefox/addon/7372/
    https://addons.Mozilla.org/en-us/Firefox/addon/7377/

  • I added the user name to log on to the computer in the active directory after adding, I can't connect to the internal application by using the user name and password...

    Hello

    I added the user name to log on to the computer in the active directory after adding, I can't connect to the internal application by using the user name and password...

    Please give the solution

    What happens when you try to connect?

    If you are able to connect using the different account, try running gpupdate/force.

    If the problem persists, you can open the discussion on:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home

    What is responsible technical issues forum.

  • I have a network drive. & Passwords, I want to force their users to log in there every time and do not use the last name of user and password.

    I have a network (an Iomega iconnect nas) drive. I want to force their users to log in there every time and do not use the last name of user and password. They can change it in control of card-how can I make sure they. I'm only using Windows 7 as standalones (with lan), there is no server connection

    Hello

    I suggest you post the same question in the TechNet forum and check if it helps.

    http://social.technet.Microsoft.com/forums/en-us/w7itpronetworking/threads

  • How not to create a partition on an essbase server without using the domain name and the port using the MXL script?

    Hi guys,.

    We know that we can create partitions on the SERVER NAME, SERVER. AREA: PORT only and ESSBASECLUSTERN founded through the Regional service CONSOLE.

    Now my question is how to do the same to CREATE or REPLACE the PARTITION script.   By default, it's get created using SERVER. AREA: PORT only.

    Here is my script that I use to create a partion.

    CREATE or REPLACE REPLICATE one PARTITION "xxxx". "' xxxx ' AREA 'xxxxxxxx' SOURCEAREA to 'xxxx '. "' XXXX ' to 'WZ00339D' AS 'xxxxx' IDENTIFIED BY 'xxxxxxx' AREA"xxxxxx ";


    Where WZ00339D is my name of essbase server.


    Put it in the script is the following.

    WARNING - 1023052 - Partition [WZ00339D:1423 Bullseye Sales] is not valid.

    But the partition is created on essbase app - database with the SERVER. AREA: port only.

    Partition part of orphaned partitions as am I try to open the partition under the name of the SERVER not only through the SERVER. Average Doman:port.

    Partition be created under title

    [WZ00339D.DOMAIN.com:1423.App.DB]-> [WZ00339D.DOMAIN.com:1423.App.DB]

    FYI, the user id used as logins are created by using domain - they are not native users.

    Please let me know how I have to have the syntax so that I can create a partition just as I help Regional service on the name of the SERVER console only.

    Let me know I can provide more information, the entire reason to use a script to create a partition is to refresh the score by a fall and create a partition.

    Roman

    I solved this problem.

    Its very simple all my code and approach was right.

    Everything I did wrong is an active directory account to create the partition and check used a native account on EAS. If you log in with the account active directory - the partition is under the name of SERVER only.

  • FireFox won't let me not do right click to change the bookmark names

    I recently bought a new computer and downloaded FireFox. When you add my favorite sites to my bookmark, the names are added automatically. They are too long, and I want to change them, but FF is not letting me do a right click to change the name.

    When I right click, it just goes to the bookmark as if I used a left click. Right-click on the computer itself works, but is not trying to change anything in a toolbar.

    Any suggestions?

    Unchecking "use hardware acceleration" was the solution for me. I can not right click on these bookmarks now.

    Thank you!

  • First characters of the file name to create a folder name

    Hello

    I need to use the first characters in a file name given to underscore image to create a folder name in which the image will be so recorded.

    I already use the slice method to fly out of the file extension and some other stuff but seeing that the image names and the code initially aren't all the same length I need another method allowing to identify underscore.

    var ChronoFolderName = app.activeDocument.name.insert_magic_method_here;

    Any ideas?

    Thanks in advance

    Neil

    Use the distribution. This will create a table filename parts which are separated by the underscore character. If you have several traits underscore, you can loop together to get the desired length. I normally just a division that separates the the frame number job number, so I just put [0] after the separation and it captures all the information to the first line of underscore.

    var newName = doc.name.split('_');
    
  • Impossible to connect from my VIC to the host using the host name.

    Hi guys,.

    When I try to log in from my VIC to the host, I get this message (see photo) but if I use the work just the IP address. I check my DNS and host VMware was not there so I created a PTR record that connects the IP with hostname, I update the DNS, but still nothing happens. Any idea?

    Thank you.

    I was almost positive it is a dns issue...

    You can test the host name of the workstation that you are trying to connect from? try clearing your cache dns on the local workstation-

    > ipconfig/flushdns

    If for some reason that doenst work, and then add the host name of the node to your hosts file

    -

  • Using the function RowIdToRowNum to create a unique identification number

    Hello
    I have an obligation to create a unique number that can be used for an authorization number. The client is already displaying the RowId on the screen in order to use it as directly as the authorization number is originally a security problem. Rep of the screen viewing can predict the authorization number, just by looking at the row ID. The process is that a manager verifies a 'Question of authorization' checkbox and workflow implements the authorization number with a prefix of customer defined and some of the digits of the ID line.

    The solution I tried to use the RowIdToRowNum function to convert the ID number online. Documentation indicates that the number of output should look like this:
    Expression - RowIdToRowNum ("< AccountID > '")
    Result - 38-57119344

    What I mean in the workflow is in the following format: 0 < 10c0c0o0u0n0t18d0 > 0. Not the most presentable format above. Anyone have any idea why this is happening and how to fix it?

    If this is not the case, no one knows other ways to create a unique authorisation number. I also thought about a string of time based as YYMMDDHHMMSS. It works, not exactly predictable, but has a number 12-digit. Would be nice if it could be shorter.

    I will update this format when the staging is back. In the meantime, if anyonw has ideas about this I would appreciate it.
    Kind regards
    Charley

    Published by: ckscott on March 24, 2010 15:58

    Published by: ckscott on March 26, 2010 09:29

    It seems that the syntax in the online help is incorrect.

    I used the following syntax in many places. Try this.
    RowIdToRowNum ([])

  • Using the label for datagrid created dynamically function

    I am creating a data grid dynamically based on the data returned by a script from the server call.

    I know that some of my data will be nested so I need to use a label function to check that these data are displayed in the datagrid control

    All of the examples of the use of a label function that I can find seem to have hard coded as in the following example columns

    < mx:columns >
    < mx:DataGridColumn headerText = "Name" dataField = "NomMenu" / >
    < mx:DataGridColumn headerText = "Vegetarian" labelFunction = "displayVegetarian" / >
    < mx:DataGridColumn headerText = "Peanuts" labelFunction = "displayPeanuts" / >
    < mx:DataGridColumn headerText = "Quantity" labelFunction = "displayQuantity" / >
    < mx:DataGridColumn headerText = 'Price' labelFunction = "displayPrice" / >
    < mx:DataGridColumn headerText = "Total industry" labelFunction = "displayLineTotal" / >
    < / mx:columns >

    However, I create my columns of the DataGrid dynamically if cannot use the < medium to achieve mx:DataGridColumn

    My code works as follows

    for (var i: uint = 0; i < xlColumns.length (); i ++) {}

    DGC = new DataGridColumn();
    dgc.dataField = "componentScores.ScoreValue" <-THIS NEEDS to USE A LABEL FUNCTION
    dgc.headerText = _qualificationSummaryScreenData.getComponentTitle (componentIndex);

    }

    I've highlighted above where I need to use a label function. I really hope that someone can help me here that I am currently taking one step forward and two steps backward with Flex right now and already several days behind on this project.

    Thank you very much

    Paul

    I do not exactly remember the syntax, but you can assign a function to the labalFunction property:
    dgc.labelFunction = myHandlerFunction; something like that

    Have you tried that yet?

    Tracy

  • How can I put several addressed in a 'group' that I can send using the group name?

    I have an address book and you can send an email to several at once by adding each in hand and the cc or BCC fields. As I often do, I need to 'collect' in a group, so I can use the name of the group to send to several people.

    _ http://KB.mozillazine.org/Thunderbird: _FAQs_:_Create_Mailing_List

Maybe you are looking for