[JS CS3] Find paragraphs that contain a single Style override

Given a document with consistently applied paragraph styles. I need to locate all the paragraphs in the document that contain a paragraph style override of the left indent. All other style overrides can be ignored.
I see in the DOM how to clear overrides, but is there any way to locate paragraphs that have a specific override?
I suspect there is no way to do this, but thought I'd throw this out there.

This will override a single paragraph attribute:
var myAttribute = "leftIndent";
var myParagraphs = app.activeDocument.stories.everyItem().paragraphs.everyItem().getElements();
for (var n = 0; n < myParagraphs.length; n++){
     myParagraphs[n][myAttribute] = myParagraphs[n].appliedParagraphStyle[myAttribute];

Similar Messages

  • How to copy item value that contain a single quote(')?

    Hi,
    I have one "Copy" button in a APEX form. When user clicks it, it simply copy the item's values from the form to a new form by using APEX provided function behind the button- "Set these item values with these values". It is simple and works fine in normal cases. However, see, we have a text field called "Product Details", user types in for example "Oracle's new vision". When I click COPY button, APEX try to copy the text in "Product Details" field from this form to a new form but it returns error because of that single quote. Is there any way I can do something to replace that single quote with two single quote like we usually do in PL/SQL in the place "Set these item values with these values" of APEX button? I tried REPLACE(#P66_PRODUCT_DETAILS#., '''', '''''') but not work. I saw someone in the forum meantioned that to use something like "/#P66_PRODUCT_DETAILS#/" to get around. Any one with success?

    Thanks. I think it should work this way. However, our form has about 20 ~30 text fields, I have to create 20~30 hiddle fields to handle the problem because I never know which field could contain a single quote. Ideally, a new version of APEX should have the functionality to deal with the problem when using "set values with those values" method. At least, it should provide some kind of interaction for user to get away from single quote or comma or column etc.
    What I did is to get out of APEX native function and to create a new records in background by PL/SQL using record id that passed in from APEX form. It works perfectly. Although, user can only edit the record after it is created, not as user friendly as "Copy first-look at it-edit it-then create it" I originally planed.
    Thanks for your help,

  • Finding tables that contain a column

    Hi all,
    I am a relatively new SQL user and am trying to figure out how to find all tables that contain a particular column, eg, 'cust_id'. I have tried a bunch of different things and searched on Google but I think I don't quite have/understand the syntax I need.
    Also, how would I display a list of all the columns in all the tables?
    Thanks!

    Hi,
    apex wrote:
    Thanks for the input! I got my first question working.
    I am still trying to understand basic ideas in SQL, eg what is the all_tab_columns in Raj's link, as usually I call something from a particular table. All_tab_columns is a view in the sys schema. There are several tables and views in the sys schema whose names start with user_ or all_ (or dba_, but you may not have privileges to see those) which are collectively called the Data Dictionary . They contain information about the database itself, including the tables in the database.
    It states there that the ANALYZE command can be used to gather statistics for this view, but I have not been able to get it working.
    Eg, in Oracle SQL Developer, I type in "help <analyze>" but it doesn't tell me what the syntax of this command is, I had to use Google which gives the following
    To estimate statistics:
    ANALYZE TABLE tablename ESTIMATE STATISTICS SAMPLE 30 PERCENT;
    To compute statistics:
    ANALYZE TABLE tablename COMPUTE STATISTICS;
    But when I try the last one it just says
    table CUSTOMERS analyzed.
    but I don't see any output, and if I try to use ANALYZE all_tab_columns; it gives me an error message. When you analyze a table, a message like "table CUSTOMERS analyzed" is all you expect to see. The main purpose of anlyzing isn't to produce a report for you to read (as helpful as thant might be) but to update the data dictionary, so that Oracle knows how to do queries efficiently. For example, if you have a query like
    SELECT  *
    FROM    patients
    WHERE   birth_date  = DATE '1981-07-28'
    AND     state_abbr  = 'NY';How does the system decide whether to look for rows with the right birth_date first, or the right state? The statistics in the data dictionary might tell it that birth_date has many more ditinct values, so looking for a particular birth_date first will narrow down the search much faster than looking for a particular state.
    By the way, the ANALYZE command has been deprecated. Unless you're using a very old version of Oracle, you should be calling the dbms_stats package instead:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_stats.htm#CIHBIEII
    I am using Sam's teach yourself SQL in 10 minutes which is very good at the very specific commands and functions it describes but doesn't really orient me to the language, doesn't explain how to use the help functions, or any treatment of tasks not contanied in the book. If someone can recommend another source would appreciate it. Much thanks!That's the frustrating thing about books; you can't ask them questions. (On the other hand, that's one of the nice things about this forum.)
    I can understand why the book doesn't say much about analyzing. The book is about SQL (e.g., how to create a table or write a query). Statistics are not in the scope of that book. Actually, they're not really in the scope of this forum, either. If you have questions about statistics, you're better off posting them in the "Database - General" forum:
    General Database Discussions

  • How do I delete or edit a captured text layer that contains a single character in Cp 5?

    My captured text layer contains a single character '7'. This renders immediately when I publish the movie, but I don't get any options when I try to edit the layer by right-clicking on it.
    Can anyone help as this is very annoying...

    Hello,
    Welcome on the forum.
    Since you are talking about 'capture', I presume you are pointing to a Typing object? You cannot edit this right away. Depending on what you want to realize, could propose two workarounds:
    If you only want to show something typing (demonstration - but another text than your character), replace the Typing object by a Text Animation (right-click menu), you'll be able to edit it.
    If you want the user to type in a text, delete the Typing object and replace it by a Text Entry Box.
    Lilybiri

  • Find module that contains function

    Get-Command isn't doing what I expected...
    C:\Users\hxchba
    > get-command | where { $_.Name -Like “dh” }
    CommandType Name        ModuleName
    Function            dh
    Why is “ModuleName” blank? How can I work around this?
    Thanks –
    PSVersion                      4.0
    WSManStackVersion              3.0
    SerializationVersion           1.1.0.1
    CLRVersion                     4.0.30319.18408
    BuildVersion                   6.3.9600.16406
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
    PSRemotingProtocolVersion      2.2

    Hi,
    Are you sure the command is being loaded by a module? As an example, here's some output from my system:
    Function        Get-DscResource                                   
    PSDesiredStateConfiguration
    Function        Get-ExCommand
    The first function is from the PSDesiredStateConfiguration module, the second is from my profile.
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • [CS3 JS] Finding paragraph containing table

    I have a table object and want to find the paragraph that contains the table. Then I want to return the contents of the paragraph previous to the table anchor. I am using this, but when I attempt to display the contents of the paragraph, I get "Object is invalid". Thanks for any help you can provide.
    // Get the paragraph inside the table.
    var oPgf = app.selection[0].paragraphs[0];
    // Make sure the paragraph is in a cell.
    if (oPgf.parent.constructor.name === "Cell") {
      // Get the parent cell and table objects.
      var oCell = oPgf.parent;
      var oTbl = oCell.parent;
      // Get the paragraph containing the table.
      var oPgf2 = oTbl.storyOffset.paragraphs[0];
      // Get the story object of the paragraph.
      var oStory = oPgf.parentStory;
      // Get the paragraph's index.
      var iPos = oPgf2.index;
      // Display the contents of the paragraph before the table anchor.
      alert (oStory.paragraphs[iPos-1].contents);
    Rick Quatro
    585-659-8267

    I found a previous post that is helping me with this.
    // Paragraph inside of table.
    var oPgf = app.selection[0].paragraphs[0];
    // Make sure the paragraph is inside a table
    if (oPgf.parent.constructor.name === "Cell") {
      var oCell = oPgf.parent;
      var oTbl = oCell.parent;
      // Get the paragraph containing the table anchor.
      var oPgf2 = oTbl.storyOffset.paragraphs[0];
      // Loop from the table anchor to the top of the story.
      while (oPgf2) {
        $.writeln(oPgf2.constructor.name);
        oPgf2 = oPgf2.parentStory.paragraphs.previousItem(oPgf2);
    This basically works, except this line gives an "Object is invalid" error when it gets to the beginning of the story:
    oPgf2 = oPgf2.parentStory.paragraphs.previousItem(oPgf2);
    I can use a try statement, but I am wondering why the loop doesn't exit gracefully without an error. Thanks.
    Rick

  • Mapping XML tags to paragraph styles that contain nested styles

    I am importing XML into InDesign (CS5.5) and the tag mapping to styles is working fine until I get to a paragraph style that contains a nested style.
    I have a sentence that starts with a number:
    1the dog runs fast.
    In InDesing properly styled looks like this:
         1  The dog runs fast.
    (tab)1(tab)The dog runs fast.
    The number is styled with a character style (Number) and the whole sentence is styled with a paragraph style (Sentence). In order to get the tabs in between the number, I have a nested style within the paragraph style (Sentence). This triggers the tabs when it hits the character style (Number) like this:
    Number up to 2 Tab Characters
    In XML, it looks like this
    <sentencetag><numbertag>1</numbertag>The dog runs fast.</sentencetag>
    Sentencetag is mapped to Sentence paragrph style and Numbertag is mapped to Number character style, but the nested style for the tabs are not displaying. I just get this in IND.
    1the dog runs fast.
    Everything works beautifully until I hit the nested styles, which I do need to get to work somehow. Any help would be much appreciated.
    Thanks in advance!

    It sounds like your tab characters are actually disappearing from content in the XML. Jeff was responding to the fact that they need to be there, and you state that you originally had them in your document, but they are not showing up once imported through the XML.
    The tabs may be disappearing in the XML document due to the "TAB" character in your text editor not being a tab, or at least not properly-formed XML TAB equivalent, OR because you are not "importing whitespace elements" when you import your XML.
    Importing whitespace elements can wreak havoc on other things in your XML structure and styled layout within the Indesign document, so I would put the XML quivalent of TAB everywhere a tab should be in your XML, and make sure NOT to import whitespace (when importing XML using "Merge Content", select not to import whitespace items from the import options).
    I believe the XML friendly character code for a TAB character is "&#9;" or "&#09;" but have not tested this. Don't include quotes when adding the character code, just the ampersand, semicolon, and everything in-between.
    Also, sounds like your tags are mapping ok for you, so your XML should look something like:
    <sentencetag>&#9;<numbertag>1</numbertag>&#9;The dog runs fast</sentencetag>.
    It should't matter where you put the TAB character equivalent in relation to your nested tag.

  • Find all topics that contain specific content

    The Find feature in Robohelp for html seems to only be able
    to find topics that contain the find criteria in the title of the
    topic. Can I do a Find that will access all the topics that contain
    a character, like a quotation mark, within the body of the
    topic?

    Hi all
    Personally I think we need to clarify whether COHAN3 is
    talking about looking through source content or compiled/generated
    content. Certainly the utility you mentioned would work for the
    source files, but it would fail on compiled/generated content.
    Cheers... Rick

  • How do I use the find method to find multiple items in a single paragraph?

    I am desigining a script to find any instances where ctrl+b and ctrl+i are applied to body text and then replace those character format overrides with Italic or Bold chartag.  Here's what the script is supposed to do:
    put the find method in a while loop that searches for character format overrides.
    If a character format override is found, pass the text range returned by the find method and the CharPropsChange flag to the GetTextForRange method.
    Use a boolean compare between the idata of the text item to the character angle and character weight constants.
    Whichever boolean evaluates to true, then use the SetTextProp method to set properties of the text range to the properties of the italic or bold character tag.
    This script does work on the first character format override found however it ignores any other overrides in the same paragraph. The cause of this is that the while loop updates the text loc that the find method uses to the next paragraph in flow. I suspect that i need to add an inner loop that goes through all the text in a single paragraph, where at teach iteration the text loc used by the find method is based on the same paragraph but the offset is modified. I am just not sure how to do that.
    function removeOverrides (pDoc)
        var vDocStart = pDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
        var vBoldFmt=getCharFmt (pDoc, 'Bold')
        var vItalicFmt=getCharFmt (pDoc, 'Italic')
        initFA_errno ();
        while (FA_errno==Constants.FE_Success)
            var vTextLoc = new TextLoc(vDocStart,0);
            var vFindParams=findOverrideParams (pDoc);
            var vTextRange=pDoc.Find(vTextLoc,vFindParams);
            if (vTextRange.beg.obj.ObjectValid())
                var vTextItems=pDoc.GetTextForRange (vTextRange, Constants.FTI_CharPropsChange)
                if (vTextItems.length==!0 )
                    if (vTextItems[0].idata==Constants.FTF_WEIGHT)
                       pDoc.SetTextProps (vTextRange, vBoldFmt.GetProps())
                    if (vTextItems[0].idata==Constants.FTF_ANGLE)
                       pDoc.SetTextProps (vTextRange, vItalicFmt.GetProps())
                    } else (Log (vLogFileName, '\nERROR: No items were found in the text format array but format override was found: '+pDoc.Name))
            vDocStart=vDocStart.NextPgfInFlow;
    function findOverrideParams (pDoc)
        var vFindParams = AllocatePropVals(1);
        vFindParams[0].propIdent.num = Constants.FS_FindObject;
        vFindParams[0].propVal.valType = Constants.FT_Integer;
        vFindParams[0].propVal.ival = Constants.FV_FindCharacterFormatOverride;
       return vFindParams;

    Hi Rick,
    Well, following up on the previous posting, I actually did figure out how to make it work but it seems rather inefficient. I can insert a new paragraph right after the paragraph that has the table anchor but when i cut the table, i also cut the paragraph i just created. So to get around that, I create two paragraphs, so that there will be one paragraph left after i do the cut and that is the paragraph that I paste the table into. Once the table is pasted into the new paragraph, I delete the other paragraph that I created.
    Here's the updated code from the for loop:
    var vTbl = vDoc.GetUniqueObject(Constants.FO_Tbl, vTextItems[i].obj.Unique);                 
    var vAnchorPgf=vDoc.NewSeriesPgf (vTbl.TextLoc.obj)      
    var vAnchorPgf2=vDoc.NewSeriesPgf (vAnchorPgf);        
    var vAnchorTextLoc=new TextLoc (vAnchorPgf2, 0);             
    var vTblTextRange=new TextRange ();        
    vTblTextRange.beg.obj=vTbl.TextLoc.obj;       
    vTblTextRange.beg.offset = vTbl.TextLoc.offset;        
    vTblTextRange.end.obj=vTbl.TextLoc.obj;        
    vTblTextRange.end.offset = Constants.FV_OBJ_END_OFFSET                 
    vDoc.TextSelection=vTblTextRange;        
    vDoc.Cut (0);                
    vTblTextRange.beg.obj=vAnchorTextLoc.obj;        
    vTblTextRange.beg.offset = 0;              
    vTblTextRange.end.obj=vAnchorTextLoc.obj;       
    vTblTextRange.end.offset =0;                 
    vDoc.TextSelection=vTblTextRange;       
    vDoc.Paste (0);                   
    vAnchorPgf2.Delete();        

  • How can I find an ID file that contains a text...?

    I've been working with InDesign for a long time. So, I have a lot of .indd files, from version 1 up to CS3.
    I need to find a file(s) that contains a specific text. E.g. the name of a person, that I'm sure is somewhere in my thousands of ID files.
    It's impossible to open all the files until I locate that text.
    In Windows Explorer, there's a way to search a word or phrase in a file, but it only returns doc, txt, rft, and other text files, even pdf. But not indd.
    Can somebody help me, please?
    Thanks,
    Hirao

    Have you tried changing the extension on your .indd files to .txt? It's
    a binary format, but there's a lot of plain text in there. The name
    you're looking for, or part of it, is probably in there somewhere.
    Search for the shortest possible text string. Some words are not continuous.
    Kenneth Benson
    Pegasus Type, Inc.
    www.pegtype.com

  • How to find a polygon that contains a point

    I have a table that has the boundaries (polygones) for all the zip codes in my state and I want to find the zip code that contains the given LON/LAT
    The following query is aparently not valid:
    SELECT *
    FROM ZIP_BOUNDARY b
    WHERE sdo_relate(b.geom, SDO_POINT_TYPE(-122.079155, 37.392892, NULL),'mask=touch') = 'TRUE'
    WHERE sdo_relate(b.geom, SDO_POINT_TYPE(-122.079155, 37.392892, NULL),'mask=touch') = 'TRUE'
    ERROR at line 5:
    ORA-29900: operator binding does not exist
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'SDO_RELATE'
    What is the correct way to write such a query?

    try the following:
    SELECT *
    FROM ZIP_BOUNDARY b
    WHERE sdo_relate(b.geom, sdo_geometry(2001, YOUR_SRID, SDO_POINT_TYPE(-122.079155, 37.392892, NULL), NULL, NULL), 'mask=CONTAINS') = 'TRUE';

  • I recently changed jobs and no longer have access to the computer that contained my Firefox bookmarks. I don't have a Firefox profile. Is there any way to find and transfer my bookmarks to my new computer?

    I recently changed jobs and no longer have access to the computer that contained my Firefox bookmarks. I don't have a Firefox profile. Is there any way to find and transfer my bookmarks to my new computer?

    If you don't have access to the old computer any longer, '''no'''. Unless you were using something like the Google Toolbar & Google Bookmarks or Xmarks, which would have your bookmarks in an online account that you could access. Firefox doesn't include an online storage feature for personal data, yet. That is coming in a future version.
    If you have a friend at your old job maybe they have access to that old PC and they could export your bookmarks to a file and email that file to you.

  • How to change the paragraph style of every paragraph that only contains an anchored object?

    Hi,
    I have a document in word that needs to be converted into indesign. The document containts instructions, each step followed by an image.
    I've managed to import the document into Indesign, and applied a paragraph style with numbering to everything (text an image).
    Now, how to change the the paragraph style of every paragraph that only contains a image? I need to get rid of the numbering.
    Thanks in advance.

    Create two Paragraph Styles and name them Image and Non-Image. Apply the paragraph styles manually to the text containing image and not containing images.

  • How I can find all the entities bol that contains a field.

    Hello, I'm trying to find all the entities bol that contains the field account_group, in the model_browser but in Tx "GENIL_MODEL_BROWSER" I have to see all bol entities if contains this field.
    My question is:
    Is there a transaction or other method where I introduce the field and appear all the Bol entities that contains this field????
    Thanks in advance

    To delete network locations:
    System Preferences / Network
    On the locations drop down menu, select Edit Locations, choose the location you want to remove and click on the minus sign.

  • Where can I find/download the package that contains: OracleConnectionPoolD

    Hi,
    I have classes12.zip and can make successful database connections using Oracle's JDBC driver.
    However, when I tried to run a connection pooling example - from a text book (called "PooledExample.java") - I got the following error messages...
    C:\testdart\testdart\source>javac PooledExample.java
    PooledExample.java:5: package oracle.jdbc.driver does not exist
    import oracle.jdbc.driver.*;
    ^
    PooledExample.java:7: package oracle.jdbc.pool does not exist
    import oracle.jdbc.pool.*;
    ^
    PooledExample.java:15: cannot resolve symbol
    symbol : class OracleConnectionPoolDataSource
    location: class PooledExample
    OracleConnectionPoolDataSource poolDataSrc =
    ^
    PooledExample.java:16: cannot resolve symbol
    symbol : class OracleConnectionPoolDataSource
    location: class PooledExample
    new OracleConnectionPoolDataSource();
    ^
    4 errors
    Where can I find/download the package that contains these classes (I'm assuming that there missing)? Is it possible that JDBC 2.0 works for Oracle9i only? (I'm using Oracle8i)
    I looked on Oracle's website but its not clear where to download this API
    Thanks!!!

    They should be in classes12.zip (oracle.jdbc.driver definitely is). It sounds like you don't have classes12.zip in your classpath when you are compiling. Normally you don't use the Oracle classes directly so you only need classes12.zip when running your application but in your case you are directly referring to them in your Java source code so you need them when you compile.
    Col

Maybe you are looking for