Inserting variable text - partial filename

Our filenames are in this format:
12345_Something_Something.indd
InDesign can insert the entire filename as a text variable.
What we want is for it to only insert the first 5 numbers – everything before the underscore — as a text variable. It would need to change every time the template is saved with a new filename. I’m thinking it’s possible to write a Javascript extension to do this in InDesign. I just don’t know Javascript at all.
1) Is this even possible?
2) What resources are available to help me get this accomplished?
3) What is considered reasonable compensation for this project?
Thanks for your help!

Sychronization works by redefining same-named styles, variables, etc. to all use the same definition as the source document, so for example you might have a variable named <header> which in one file was a running header (character style) type, in another a running header (character style), but based on a different character style, and in yet another document is would be based on last on page instead of first on page, or a similar situation. Synching would cause the variable to look for the same information across all docs.
That said, it sounds like this might be useful for adding a book file name, but there is a subtle difference. In the case of a normal variable, the information it picks up must be in the document where the variable is located. A running header variable ont he first page of a file in a book, for example, cannot pick up the information from the last page of the previous file in the book. Variables are self-contained within the files.
You COULD define a custom text variable, perhaps with the book filename, and add it to all the documents, but it will not automatically update if you change the name of the book file.

Similar Messages

  • PDF forms - underlined variable text

    Hello Everyone,
    I am trying to create a PDF form with variable text fields in Acrobat 9 Pro and I see there are very limited possibilities in the text formatting. I can specify font, size, color, border, but there is missing any option how to switch on the underlining of the text. Is there any way how to achieve this?
    Thanks in advance for any hint.
    Regards,
    Jan

    You can add some JavaScript to your script that imports the data from the database and format the inserted text by using the span object to apply the underline property. The following ecample is from the Acrobat JavaScript API Reference.
    Example
    Write rich text to a rich text field using various properties. See the Field object  
    richValue property for more details and examples.
    var f = this.getField("myRichField");
    // Create an array to hold the Span objects
    var spans = new Array();
    // Each Span object is an object, so we must create one
    spans[0] = new Object();
    spans[0].alignment = "center";
    spans[0].text = "The answer is x";
    spans[1] = new Object();
    spans[1].text = "2/3";
    spans[1].superscript = true;
    spans[2] = new Object();
    spans[2].superscript = false;
    spans[2].text = ". ";
    spans[3] = new Object();
    spans[3].underline = true;
    spans[3].text = "Did you get it right?";
    spans[3].fontStyle = "italic";
    spans[3].textColor = color.red;
    // Now assign our array of Span objects to the field using // field.richValue
    f.richValue = spans;

  • Discoverer Plus - How to include variable text in the Title

    Hi,
    I need to include a variable text in the report like the user information or another information i woul like to obtain from a query that is not the standars date,time,... oracle discoverer plus improves us.
    I tried with calculations associates to a parameters, but is not possible.
    I hope i explained correctly.
    Thanks,

    This can be done by creating a parameter, then a calculation, then a condition. Then under "Edit Header" or Page Setup, choose "Header" or "Footer"as needed and choose to insert the Parameter.
    Step by step Example instruction:
    1-Create a parameter as follows:
    --Item = NONE
    --Name = "Workbook run by" (This will appear in the heading or title when workbook run)
    --Prompt = "Please enter UserID in all capital letters"
    --Description and Default value left blank
    2-Create a Calculation
    --In New Calculation choose "Function" then choose the function "USER" from Database. (This is all that the calculation will need.)
    --Name Calculation  = i.e.: "DB_USERID" 
    3-Create a condition as follows:
    --Name = Request_UserID
    --Item = DB_USERID
    Condition = IN
    Value = Choose parameter: Workbook run by
    -Double click on worksheet title, choose Insert, then choose Parameter (This can be done the same way under Page Setup for Header and Footer
    -The calculation will create an extra column which I put at the top as a Page Item
    -This will force the user to enter the UserID they are logged in to Discoverer with.
    -This is case sensative. Therefore, since all Databe IDs are stored on the Database in all-caps, then the user will have to enter in all caps as well.
    Thanks,
    Sutirtha

  • Preventing file extensions being added to variable text (File Name)-

    …when one imports one INDD file (v5 or 6) into another. We have the variable text specifications set to exclude file extensions. The .indd does not publish in the originating document.
    We use INDD import and the text variable "File Name" quite a lot.
    TIA-
    -Todd

    I think he's saying that when you open an ID doc, the filename variabe inside can be set to report just the name, but when you import that same doc into another ID doc, the filename variable shows the ".indd" extension.
    EDIT: Yes, that is (stupidly) how it seems to work. No idea how to fix it though. Suspect Adobe has to issue an update.

  • Inserting current pathname and filename into Pages documents?????

    Pages help explicitly says you can put "filenames" and "pathnames" into formatted text fields just as you can put in page numbers and the date. It does NOT tell you how to do this!!! What do I type so that my current pathname appears in pages? Or the current filename of my document?? I am trying to create a template so that filename, pathname, date, and number of pages always appears in the header.

    Well, it is possible to automatically insert the document's filename into the header as I routinely do it in (dare I say) Microsoft Word and Microsoft Excel. I write many documents long and short. For each of them I start with the same template, one that includes the filename and the date "last saved" in the header.
    Those who have an ironclad hierarchy where every file is unambiguously filed into one folder might easily be able to retrieve every file. For me, it is very useful to know the filename of the document I am searching for (as it is on my hardcopy) and to know that it is "sept-mon-rpt-final" and not "sept-mon-rpt-mikes-edits". As my example suggests, the greatest utility of this is for version control.
    I do not want to type my filename into every draft document, I want them to insert themselves in the header in the same manner that Pages inserts the current date. This information, filename and pathname, is in the Mac system. Indeed, there is a reference to it in the Pages documentation.
    In Pages'08 Help - the page titled: "Working with Document Parts" under "using Headers and Footers" it says, "Add headers and footers to give your documents page-by-page identity by showing the date and time, page number, or filename and pathname."
    When you click on the link that says "Using Headers and Footers" you are taken to that page, where it says, "you can put your own text or graphics in a header or footer, and you can use formatted text fields. Formatted text fields allow you to insert text that is automatically updated. For example, inserting the date field shows the current date whenever you open the document. Similarly, page number fields keep track of page numbers as you add or delete pages."
    After this you hit a dead end.

  • Inserting variables

    I found out how to do this in RH HTML but it's RH for Word
    that I need to insert variables. Is there a way to add variables in
    RH for Word?
    =================================
    Is there a quick way to insert variables to be able to
    dynamically change text while authoring in Word for RH HTML? I'm
    used to FrameMaker and it is a simple process. When I read MS Word
    Help I couldn't get a quick answer on how to insert variables. For
    example, we want to use variables for company names, product
    versions, etc. Any help is appreciated.
    - Azi

    Like this:
    $workbook.worksheets.item("YourWorkSheet").cells.item($lastrow,1) = $name
    $workbook.worksheets.item("YourWorkSheet").cells.item($lastrow,2) = $address
    $workbook.worksheets.item("YourWorkSheet").cells.item($lastrow,3) = $phone
    As I described in my initial response, $lastrow is the row, followed by the column number, separated by a comma.  Instead of incrementing the $lastrow variable, increment the column number to insert the data across a single row.
    I hope this post has helped!

  • Inserting variables in RH for Word

    Is there a quick way to insert variables to be able to
    dynamically change text while authoring in Word for RH for Word?
    I'm used to FrameMaker and it is a simple process. When I read MS
    Word Help I couldn't get a quick answer on how to insert variables.
    For example, we want to use variables for company names, product
    versions, etc. Any help is appreciated.
    - Azi

    quote:
    Originally posted by:
    azi_us
    Is there a quick way to insert variables to be able to
    dynamically change text while authoring in Word for RH for Word?
    I'm used to FrameMaker and it is a simple process. When I read MS
    Word Help I couldn't get a quick answer on how to insert variables.
    For example, we want to use variables for company names, product
    versions, etc. Any help is appreciated.
    - Azi
    The way I do it is to use document properties. Assuming that
    it's Word 2003 or lower (not sure where it is in 2007) go to File
    -> Properties. There are a bunch of built-in properties, or you
    can create your own on the Custom tab.
    You can then use Insert -> Field. One of the fields that
    you can insert is Doc Property, which allows you to add the values
    that you've put in as document properties. When you select the
    document and hit [F9], the whole thing will update with the new
    field values.

  • JS scripted needed to add custom text plus filename to file info in document title

    Would greatly appreciate any help with this one...
    JS script to add custom text plus filename to file info in document title
    many thanks

    Super :O)
    I have a folder of say 50 images and I want to run a JS script batch
    example in the document title :  image Nr 81205
    custom text is "image Nr" +  file name "81205"
    activeDocument.info.title =" image Nr" + decodeURI(activeDocument.name);
    would this be correct without seening the file ext
    many thanks

  • How to insert sales text (MM02) into a single record of a Ztable.

    Hi,
    I'm extracting data from different data base tables and populating a Ztable which has Matnr as primary key and sales text as a field.
    I have already used READ_TEXT to display the text and it is displayed in multiple records which in turn leads to duplication of Material numbers.
    Now I want to avoid duplication of records (Matnr) as this being a primary record, and display the sales text of a particular material number into one single record.
    Can anyone tell me how to insert sales text (MM02) transaction into one single record.
    Thanks,
    Govind

    sorry i am not enough clear about your requirement...
    as i can understand i am explaining to you.
    suppose your itab contains repaeating matnr.
    matnr
    1
    1
    2
    2
    2
    3
    3
    like this.
    data : text(200),
             matnr like mara-matnr.
    loop at itab.
    call READ_TEXT fnmodule.
    loop at tline.
    concatenate text tline-tdline into text.
    endloop.
    matnr = itab-matnr.
    at end of matnr.
    itab1-matnr = matnr.
    itab1-text = text.
    append itab1.
    clear text.
    endat.
    endloop.
    NB change the code as per your requirement
    regards
    shiba dutta

  • How to Insert the Text in Selected Text Frame-Reg.

    Dear all,
    I am using the SnipperRunner - SDK, and create the TextFrame, but I can't insert the Text in the Particular Frame. so please give me the soultions,
    (*) Create TextFrame is ok,
    (*) Select TextFrame is also ok,
    (*) now, my Query ->
    How to Insert the Text in the Selected Frame?. (or)
    How to Link the Selectable Frame and my Text.? (or)
    How come to know the TextFrame is select?.
    Please any one can suggest me through the Coding....I will appreciate you...
    Thanks & Regards,
    T.R.Harihara SudhaN

    Hi,
    you have to get the TextModel associated with the textframe. Once you got that, ITextModel has an Insert()-method. You could also process kInsertTextCmdBoss - there are quite a few examples around. I believe WriteFishPrice also inserts text into a frame, just as an example. Good luck ...
    Bernt

  • Please Help.JTable insert styled text

    Hi all java guru,
    on post http://forum.java.sun.com/thread.jsp?forum=57&thread=485469 i've depicted my scenario in which i have a JTable where i want to add styled text.
    i've implemented a CustomTableModel that maintains information about text style, in such way that when renderer cell, i can rebuild exact text with its style....same method is adopted for CellEditor.
    It is possible to have more than one JTable in my application....then to correctly handle all JTables ' put them in a vector and during editing and rendering i find current focusable/selected JTable and edit/render it.
    Clearly i maintain information about style of text when i insert it, that is when i insert text, i update my CustomTableModel...same thing must be done when i delete text from JTable...that is, i must update CustomTableModel too in this case.
    Because my CellEditor is a JEditorPane component (extend it) i've registered document associated to it to a DocumentListener that notify every time that a remove operation is happens.
    What is the problem now???problem is that when i finish to edit a cell and click on another cell i've got a removeUpdate(DocumenEvent e) event, and i can't distinguish it.....it seems a real remove event....
    In this case(when i change cell) the code that is executes returns wrong result and invalidate all the rest.
    I think error is where i register celleditor , now i do it in CustomCellRenderer class that extend JEditorPane and implements TableCellRenderer.
    Please help me...this is a great trouble that invalidate all my work :(
    Any new idea is welcome.
    regards,
    anti-shock

    Hi stanislav, of course i can...you're a myth :)
    public class CustomCellEditor extends AbstractCellEditor implements TableCellEditor {
           CellEditor cellArea;
         JTable table;
         public CustomCellEditor(JTable ta) {
              super();
              table = ta;
              // this component relies on having this renderer for the String class
              MultiLineCellRenderer renderer = new MultiLineCellRenderer();
              table.setDefaultRenderer(String.class,renderer);
         public Object getCellEditorValue() {
              return cellArea.getText();
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,     int row, int column) {
              int start = 0;
              int end = 0;
                                               // Get current selected table
              TableEditor tb = (TableEditor) TableEditor.getSelectedTable();
              TableModel model = (TableModel) tb.getModel();
              Vector fontInfo = model.getFontFor(row,column);
              CellEditor cellArea = (CellEditor) ((CustomCellEditor)tb.getCellEditor (row,column)).getCellEditor();
              Document doc = cellArea.getDocument();
              String content = tb.getValueAt(row,column).toString();     
              if (doc!=null && fontInfo.size()>0 && !content.equals("")) {
                                                     // This method reads from model and get right style info
                                                     // for current text, and restore them
                                                     restoreFontWithAttributes(doc,fontInfo,content);
              else
                   cellArea.setText(tb.getValueAt(row,column).toString());
              cellArea.rowEditing = row;
              cellArea.columnEditing = column;
              cellArea.lastPreferredHeight = cellArea.getPreferredSize().height;
              return cellArea;
          * @return
         public CellEditor getCellEditor() {
              return cellArea;
         public class CellEditor extends JEditorPane {
              private CellStyledEditorKit k;
              public CellEditor() {
                    super("text/plain","");
                    k = new CellStyledEditorKit();
                    setEditorKit(k);
                    // I tried to add document here, but i have had wrong behavior
                   doc = new DocumentListener() {
                   public void removeUpdate(DocumentEvent e) {
                      // Get current selected table
                      TableEditor tb = (TableEditor) TableEditor.getSelectedTable();
                      TableModel model = (TableModel) tb.getModel();
                      model.updateFontInfo();
                   getDocument().addDocumentListener(doc);
    }Ok, stan...this is my CustomCellRenderer class....as i have already said, i have some style text info mainteined by CustomTableModel associated with JTable.
    I update CustomTableModel every time that an insert and remove operation happens.
    If i add a DocumentListener to CellEditor (that rapresents editor cell of my table) happens that, if i remove some character from an editing cell, i got a removeUpdate event.....and this is right!!! But if i change cell (e.g. supposing editing cell(1,1), click on cell(2,1) then stop edit cell(1,1) and start edit cell(2,1)) i got a removeUpdate event, that I don't wait for to me..
    Look at this:
    empty cell | some text
    cell 0 ------- cell1
    supposing you're in cell1 and you have finished to insert "some text".Then click on cell0, that is empty....then document associated with CellArea(extend JEditorPane) before of the click on cell0 had some text, but after click have no text, then for it a removeUpdate is happens.....and is that one i got..
    it's as if an unique document is associated to all cells, while should be one document for each cell (i hope this is right).
    Clearly, i've same code for renderer, in such way that i can restore style of text on rendering.
    Hope is clear....if U have any idea or suggestion please give to me.
    Tnx a lot Stanislav..
    regards,
    anti-shock

  • Variable Text not working as dynamic header in Crystal report

    Dear Experts,
    I'm working Crystal report that connected to Query BEX SAP BW trough SAP integration kit,
    currently i have case that need report dynamic header using variable text from BEX query, but seem the variable text not working in Crystal reports. the header in Crystal report shown as Desription\technical name, not result from the variable text in Query BEX in SAP.
    In https://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal%20Reports%20and%20BW%20query%20elements stated that the "Text variable" with "replacement path" is supported, but i don't know in my query is not working.
    i already set in Database -> options->  table and fields -> Show Both, but the text variable still not working.
    can you help me
    Crystal Reports 2008 12.2.0.290
    SAP Integration KIT 12.1.0.890
    Thanks
    Luqman

    Post your question BEX and B1 and classic SAP data source issues to the Integration Kit forum

  • Decode Case statement to insert total text

    Where the AGE BRACKET fields are empty or Null I need to insert "Total" text? Can anybody help?
    Table
    SOURCE CODE     AGE BRACKET     COUNT
    CLUBBEN     0-40 Years     3     
    CLUBBEN     41-49 Years     6     
    CLUBBEN     50-59 Years     38     
    CLUBBEN     60-69 Years     205     
    CLUBBEN     70-79 Years     181     
    CLUBBEN     80+ Years     19     
    CLUBBEN          452     
    CLUBJUNE     41-49 Years     2     
    CLUBJUNE     50-59 Years     21     
    CLUBJUNE     60-69 Years     100     
    CLUBJUNE     80+ Years     1     
    CLUBJUNE          124     
    TOTAL          576     
    Script Currently entered
    SELECT DECODE(GROUPING(F.SOURCE_CODE),1,'TOTAL',0,F.SOURCE_CODE) as "SOURCE CODE",
    CASE
    WHEN D.AGE BETWEEN '0' AND '40' THEN '0-40 Years'
    WHEN D.AGE BETWEEN '41' AND '49' THEN '41-49 Years'
    WHEN D.AGE BETWEEN '50' AND '59' THEN '50-59 Years'
    WHEN D.AGE BETWEEN '60' AND '69' THEN '60-69 Years'
    WHEN D.AGE BETWEEN '70' AND '79' THEN '70-79 Years'
    WHEN D.AGE >= '80' THEN '80+ Years'
    ELSE ''
    END AS"AGE BRACKET",
    COUNT(F.MEMBER_COUNT) "COUNT"
    FROM A3_FACT_NEW F, DIM_AGE D
    WHERE F.AGE_KEY = D.AGE
    AND F.JOIN_DATE BETWEEN '25/JUNE/2012' AND '30/AUGUST/2012'
    AND F.BEN_TYPE = 'Prime member'
    AND F.SOURCE_CODE IN ('CLUBBEN','CLUBJUNE')
    GROUP BY ROLLUP(F.SOURCE_CODE,
    CASE
    WHEN D.AGE BETWEEN '0' AND '40' THEN '0-40 Years'
    WHEN D.AGE BETWEEN '41' AND '49' THEN '41-49 Years'
    WHEN D.AGE BETWEEN '50' AND '59' THEN '50-59 Years'
    WHEN D.AGE BETWEEN '60' AND '69' THEN '60-69 Years'
    WHEN D.AGE BETWEEN '70' AND '79' THEN '70-79 Years'
    WHEN D.AGE >= '80' THEN '80+ Years'
    ELSE ''
    END)
    ORDER BY(F.SOURCE_CODE),(2)
    --------------------------------------------------------------------------------------------------------------

    Welcome to the forum!!
    Please consider the following when you post a question. This would help us help you better
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to insert vietnameese text in a form

    Hi all,
    How to insert Vietnamese text in a smartform since it is not supported by SAP.

    You can insert using standard text So10 call the standard text in your form where every it is required.
    Download text/language converter using google search. Convert text to your desired language and place it in SO10.
    close the thread once your question is answered.
    Regards,
    SaiRam

  • How to insert independent text column in pages ?

    hello,
    I have made a flyer from one of the templates in pages..
    What I wnat to do is insert another text colum indicated at the attachment. I just con not figure out how to do it.. It keeps insertin within the main text..
    any help will be appreciated.
    Gokce
    oopss.. how do we attache images here ?
    Message was edited by: Gokce

    Gokce,
    Have you tried inserting a text box? If not, click on View > Show Layout to enter the layout view. Click in the gray margin area to make your cursor disapppear. Then click on Insert > Text. The box will be defined as Fixed on Page (because you clicked in the margin area), allowing you to move it anywhere on the page. You can resize it to look just like a column, then put text in it.
    Hope this helps.
    -Dennis

Maybe you are looking for

  • How can I examine cookies in Safari 5.1.1?

    Since the 5.x upgrade I've noticed that Safari handles cookies dramatically different than it did before. I used to be able to view all the cookies stored by each site and delete the ones I didn't want. I could keep my login items while deleting adve

  • Officejet Pro 8600 won't connect to wireless with Wireless extender connected

    I am trying to get an Officejet Pro 8600 to connect to a wireless network, but it will not connect when my wireless network extender is connected. Once I disconnect the extender, it connects fine. Here is the setup. I have a Netgear wireless cable ga

  • Simple problem with triggers

    Hi all, Initially I have written a trigger for testing .But im not able to write it as per the requirement.Actually I have written the trigger for a table "test" when a row is inserted into it then my trigger will insert a row in another table.In the

  • How to gather table stats for tables in a different schema

    Hi All, I have a table present in one schema and I want to gather stats for the table in a different schema. I gave GRANT ALL ON SCHEMA1.T1 TO SCHEMA2; And when I tried to execute the command to gather stats using DBMS_STATS.GATHER_TABLE_STATS (OWNNA

  • Starting J2EE(ABAP+Java Add In)

    Hi We've got BW 3.5 on Sap NetWeaver 2004 ABAP + Java (Java Add-In). We've got the problem with starting it. Our system is on 1 server x64. We've got Windows 2003 Server. DataBase Oracle. So in MMC everything is OK. We've got ABAP + Java instance (pr