How to write data at the end of doc in reverse order?[CS6-jsx]

I need to move all my spec texts entries at et end of doc. To keep correct reference in all found entries i have to process in reverse order
for (i = mFound.length-1; i>=0; i--){
...etc
but can't to think up, how to place entries in write order at the end.
String:
mStory.insertionPoints.item(-1).select();
app.paste();
does not work properly (of course). It makes this:
10.
9.
8.
7.
6.
...etc
How to get
1.
2.
3.
4.
...etc

Hi,
I think what you are doing is the code below.
you should fix using
findGrep(true) => true is 'reverse order' option
and move()
var dummy = "Um veles 1.eatiorum et alic tem 2.quibusda nit volest, to corion conserum rem ipsanitate verores sequiduciat la demquis 3.inctorem ellestem reptis a et offic tem quidel earcide bissere mpellorerit ipsaecearios 4.volorrovid earchit omnitat atquatus aut quam nimet idelluptatum quis aut lam quo 5.ipsapiciis se simus autem fugias esto et et volupti to eum rem reius nobitatur aut evelis rae arumque lanihilicia sapitiam volorep ellupta volupta aut qui rendia doluptusam am necatur? Em aut abo. "
var doc = app.documents.add();
var tf = doc.textFrames.add({geometricBounds: ["10mm","10mm","100mm", "80mm"], contents:dummy});
var st = tf.parentStory;
var find_grep_obj = {
  findWhat : "\\d+\\.[^\\s]+"
with(app.findChangeGrepOptions){
  includeFootnotes            = false;
  includeHiddenLayers         = false;
  includeLockedLayersForFind  = false;
  includeLockedStoriesForFind = false;
  includeMasterPages          = false;
  kanaSensitive               = true;
  widthSensitive              = true;
var match = grep_find(doc, find_grep_obj);
function grep_find(target_obj, find_grep_obj){
  app.findGrepPreferences = NothingEnum.nothing;
  app.findGrepPreferences.properties = find_grep_obj;
  var result = target_obj.findGrep(true); //=> reverse order [..., "3.inctorem","2.quibusda", "1.eatiorum"]
  app.findGrepPreferences = NothingEnum.nothing;
  return result;
var i = match.length;
while (i--) {
  st.insertionPoints[-1].contents = "\r";
  match[i].move(LocationOptions.AT_END, st);
thank you.
mg

Similar Messages

  • How to write data in the Infocube using BI IP input ready functionality

    Hi All,
    Please help me in the following scenario...
    Input given to me is-- ZCUBSDID cube with associated role ZSP_BW_SAI_BUDGETS-DID_ALL.
    Query is ZR_V7_CO_PA_CH_PB_DID_BUDGET_2 based on agregation level ZALBSDID (& ZALBVDID) in infoarea ZDACOPA.
    I have to write data in the cube by using Input-Ready functionality of BI IP. Can you please provide me step by step procedure for writing the data in the cube as i am very new in IP side.
    Also if any further input required just let me know.
    My Analysis-> I checked that cube is in Planning mode and in Query Designer>Property Pane-->Planning Pane, Query is in Change mode and also associated Keyfigures are in Input-Ready enabled.
    Also i am able to access query in Analyzer.
    This is very critical for me and need to provide solution asap. Please update asap. It really be great help.
    Thanks & Regards
    Rupali Singh

    Hi,
      To enter data in to planning cube through manual planning, you can do the following,
    1. In a query that is used for manual planning, a cell is only input ready if each characteristic value of all the characteristics included in the aggregation level is unique. None of the aggregated values on the aggregation level are therefore input ready: Totals, subtotals and inner hierarchy nodes are not input ready.
    2. To be able to change values for calculated key figures (like Average Price as a quotient of Amount and Quantity), these must be based on input-ready formulas, and at least one operand must be input ready. More information: Defining Inverse Formulas (Designtime) and Inverse Formulas (Runtime).
    3. In order to change aggregated values (with respect to the aggregation level), these values must be disaggregated on all the data records that contribute to the aggregated value of the cell. More information: Disaggregation (Top-Down-Distribution).
    4. If a query used for manual planning includes a navigation attribute that is restricted using a fixed or dynamic filter or a restricted key figure, the system treats the navigation attribute as a normal characteristic. The rule under point 1 applies here. The system only reacts as though the navigation attribute were not part of the query if the navigation attribute is not restricted.
    5. In a query defined on a MultiProvider or a complex aggregation level that you want to use manual planning for, a cell is not input ready if the InfoProvider that is defined by this cell is:
                                a.      Not a real-time InfoCube
                                b.      A real-time InfoCube that has been switched to load mode
    6. If an input-ready query is executed in change mode, but the requested data is locked by another user, the query starts in display mode.
    For more details, you can refer to the following link,
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
    Hope this helps you to solve your issue.
    Regards,
    Balajee

  • How to commit data at the end of a bounded task flow

    Hi all,
    I am using JDev 11.1.1.0.2.
    I have this situation
    1) A page with a button that goes to a task-flow to insert data (property data-control-scope set to shared and property transaction set to requires-transaction as suggested in http://www.oracle.com/technology/products/jdev/tips/fnimphius/cancelForm/cancelForm_wsp.html?_template=/ocom/print )
    2) At the end of this task-flow a I have a TaskFlowReturn (property End Transaction set to commit)
    When I click the button associated to this TaskFlowReturn, I return to the first page (described in 1) ), but the data I have just inserted are only submitted, but not committed.
    What's the problem?
    Any suggestions?
    Thanks
    Andrea

    Hi,
    if you set the return activity to commit the transaction then this is done. I don't see why rollback should work but commit doesn't
    Frank

  • How to write data to the DAQ for a specified length of time while still reading the input data?

    Hello,
    I'm using labview 2012 and am trying to turn on a signal for a specified length of time in labview at the press of a button. The signal goes into an AO (PXI 6723) through my system, where the voltage gets divided by 2, the read in through the AI (PXI 6225). I want to write and read voltage constantly and then have a spike of voltage after pressing a button in LabView while still reading the voltage value for the specified amount of time.
    Parameters:
    constant voltage of 1 volt to Analog output (reading and writing) seen through a waveform chart.
    for 1 second, turn on 3 volts and see the response on the waveform chart.
    My specified delay time does not match the elapsed time. I am having difficulties doing this. I have attached the VI.
     ( I can't upload a functional VI since it shows "the contents of the attachment doesn't match its file type") How can I attach the VI?.
    Thanks!
    Eduardo

    Mike,
    Thank you for your reply! I greatly appreciate it. I currently don't have any DAQmx timing in my application. I tried using it and, without really understanding how it works nor how to manipulate it, the whole test end up taking a long time to change the values i.e. too slow.
    The DAQmx timing I used was the sample clock since it was for analog signals, but I don't really understand the buffer, what that means nor how to use it. inputting a rate time for it also made my test slower. The rate time is the samples per channel per second, but I'm not sure how to determine a number so that I am collecting the data I need and take into account aliasing.
    I know the PXI 6225 has the capability to read 250kS/s (which I am assuming it's kilosamples per second or 250,000 samples per second). I am using 32 differential channels. I have read that I have to divide the maximum sample rate by the number of channels, (250kS/s / channels) but I don't know if I should count the number of total channels (64) or differential channels(32). In other words, is the per-channel maximum rate:
    250,000/32 = 7,812.5 samples per channel per second, or
    250,000/64 =3,906.25 samples per channel per second
    Furthermore, If I know the number of samples per channel per second, how can I implement that knowledge to the DAQmx sample clock so that my sampling is as fast and as accurate as it can be?
    I attached an image of my DAQmx functions in my code, I merged all the stacked sequence structures in paint so you can see them.
    thanks for your help!
    Eduardo
    Attachments:
    DAQmx tasks.jpg ‏211 KB

  • How can I save/write data on the hard disc of the Real-Time System?

    I would like to acquire huge size of data via LabView Real-Time System.
    Since data is so huge, I am now thinking that it might be good idea to
    write/save data on the hard disc of the Real-Time System first and then
    transfer the data file to a data processing PC using FTP etc.
    If you know how to save/write data on the hard disc of the Real-Time System
    (Ver. 7.1), please let me know.
    Thanks,

    Just to add to Aitortxo's good answer,
    Since you have only one Drive ( C:\) on your RT, just keep monitering the availible disc space.
    After every few set of file writes keep transferring Backups delete these files, so that you  keep C:\ drive space for running your applications.
    Regards

  • How to store data in the text line by line?

    when i write the data into *.txt, the data I wrote before is deleted.
    how can wrote the data into the txt following the existing data?
    how to write data line by line? many thanks!
    my code is like:
    private String text = "i am yanbo du, i am a boy.";
    public BufferWriteMultiKey( ) {         
         try {
              StringTokenizer st = new StringTokenizer(text, " ,.");
              File fil =new File("f.txt");
         //FileWriter fw = new FileWriter(fil);
         //BufferedWriter bw= new BufferedWriter(fw);
         DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fil)));
    while(st.hasMoreTokens())
    String s = st.nextToken();
         //bw.newLine();
         out.writeChars(s);
    out.writeChars("\n");
    out.close();

    use a random access file and append text at the end.
    read the file in line by line using a BufferedReader and store each line in a List of Strings, of course.
    %

  • How to write data from query into Real time cube?

    Hi All,
    Can anyone explain me step by step how to write data into a real time cube from front end queries.
    Thanks in advance

    Hi
    You can do this using Integrated Planning
    You need to create a aggregation level on the Real Time infocube and can create Planning function/sequence, Variables if needed.
    Then you can create query on this aggregation level and you can make the keyfigures Input ready in property pane and you can change the data and save it into cube.
    Please find below help link which clearly explains step by step about Integrated Planning like creating input ready queries etc.,
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
    Regards
    Ravi

  • Automatically add a current date at the end of the comments

    Hi,
    I have a form on a table with 5 fields... on one the field I am asking my users to enter comments...
    I am looking for a functionality to automatically add a current date at the end of the comments, only when they are updated or newly filled in...
    Please advice how can I do it... I am anticipating some sort of a trigger on column (when the data is modified)...
    Thanks

    automatically add a current date at the end of the comments, only when they are updated or newly filled inDo you want to add the date to the page item itself and hence show it to the end user as and when its changed, thn
    Assuming comments item is named '*P1_COMMENTS* , add the following to the "execute on load"
    $('P1_COMMENTS').change( function(){
      var d = new Date();
      $s('P1_COMMENTS', $v('P1_COMMENTS')+ d.toUTCString() );
    });If its to be done only when updating ie in the PLSQL block
    UPDATE <table name>
    SET <comments _column> = (  SELECT DECODE(  NVL(<comments _column>,'')
                                                                          ,NVL(:P1_COMMENTS,'')
                                                                          ,<comments _column>
                                                                          ,:P1_COMMENTS||TOCHAR(SYSDATE,'DD-MON-YYY')
                                                  FROM DUAL
    WHERE <condition>

  • How to write data to an XML file present under application server

    frnds: can ne one tell me, how to write data in to a file, which is present under a application server
    Ex: i want to write a string data in to a file test.txt which is present under "http://localhost:8080/<some_webapp>/test.txt"
    Note:i have deploted a service<some_webapp> under Tomcat/webapps dir

    Very simple. A servlet can writes to that file if it has the good rights.
    In the servlet get (or post) method, use a code like this:
    import java.io.*;
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
    try {
    String filePath = this.getServletContext().getRealPath("/text.txt");//See http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
             PrintWriter writer = new PrintWriter (filePath);
            //or BufferedWriter out = new BufferedWriter(new FileWriter(filePath));
            writer .println("aString");
           writer.flush();
            writer .close();
        } catch (Exception e) {
           e.printStackTrace();
    }Hope That Helps

  • How to write data on to a location other than desktop or application server

    Hi all,
            I already posted this question.But  i didn't get exact answer
    Can anyone explain that how to write data on to a share drive located on other Nonsap server.Please I dont want to FTP the file.I dont want that solution.I need to write directly on to that Nonsap share drive..
    Thanks,
    Balaji

    I guess the only way is sending the file using a XI connection to the non sap system server,generate RFC adapters, inbound, outbound interfaces, using xml or soap or IDOC to move the file to that system.

  • How to write date format in bdc

    how to write date format in bdc report

    Hi,
         First you have a data decleration i.e data l_format(10) type c.
    now if a variable say l_date which is of sy-datum type, you will have to  <b>write l_date to l_format</b>, this will transfer the date in which you(user) have set the date format in user settings. Never hard code the format such as dd.mm.yyyy. or mm/dd/yyyy because the may have different formats, and the BDC will fails. After you have used write to to new l_format, pass this new value to BDC recording.
    Reward if useful.
    Kiran

  • How continuously write data to a txt file

    hello, 
    first of all, sorry for bad English, but I have a problem to continuously write data to the txt file.... I have one 2D array with values of some function and based on 2 sliders (values of the sliders) i want to interpolate value using bilinear method... and after that value of the sliders, interpolated value, and value of the nearest points i wish to write to txt file ... for every 2-3 seconds perhaps it would be ideal to be formated as :: 
    x   y   f     f1   f2   f3   f4
    but... first i have problem with writing data, because every time it deletes old data and just write new one and it's not horizontal... I'm very very new at this (it is obvious) and any help will be very appreciative  
    thanks  
    Solved!
    Go to Solution.
    Attachments:
    Proba.vi ‏21 KB

    Hi there,
    May I suggest you start with the LabVIEW tutorial?  Or perhaps this one?
    I say that because 1) you said you're new at this, and these tutorials are great for getting started; and 2) you don't seem to understand the concept of dataflow.
    A structure, such as a loop or subVI or function, cannot start executing until it has all of its inputs available.  Therefore, the loop which contains your file write (bottom loop) cannot execute until your top loop is done executing, because it depends on inputs from your top loop and those inputs aren't available until the top loop is finished.  Thus, your file will contain only the data from your final top loop execution.  You might be thinking that your loops are executing in parallel.  They are not.  Your file loop is executing after your data loop has finished...that is to say, your file loop executes exactly once, after you press your stop button.
    You can do two things here to fix that:
    1.  You can move your file write into the top (data) loop. (probably easier for now)
    2.  You can use a queue to transfer the data from your top (data) loop into your bottom (file write) loop. (more complex, but a better idea in the long run)
    One other thing.  Move the "open file" function outside the loop.  Opening and closing the file in each loop iteration will cause problems.  Open the file once.  Write to it in each loop iteration.  Close it when you're done.  Like this:
    Note that this is not complete code...you need to provide the data to write.  This is just to show you how to set up a continuous file write.
    Ok, start with the tutorials and we'll go from there. 

  • How to write data to text file using external tables

    can anybody tell how to write data to text file using external tables concept?

    Hi,
    Using external table u can load the data in your local table in database,
    then using your local db table and UTL_FILE pacakge u can wrrite data to text file
    external table
    ~~~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251
    UTL_FILE
    ~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#sthref14093
    Message was edited by:
    Nicloei W
    Message was edited by:
    Nicloei W

  • How to write data to file Java ME cldc 1.1 midp 2.0?

    I newly in java me, please help me.
    I make project in NetBeans 7.0.1. and use cldc 1.1 midp 2.0.
    I want to write data to the file.
    How can I do it?
    I try to use FileOutputStream. But it don't exists in java.io
    NetBeans shows me only this list of classes and interfaces in java.io:
    ByteArrayInputStream, ByteArrayOutputStream, DataInput, DataInputStream, DataOutput, DataOutputStream, InputStream, InputStreamReader, OutputStream, OutputStreamWriter, PrintStream, Reader, Writer.
    Why it so short?
    And how I can write data to file?
    Data can be array of bytes (byte[]) or Object it better.

    You must use JSR 75: FileConnection. Please check the following article "Getting Started with the FileConnection APIs":
    http://developers.sun.com/mobility/apis/articles/fileconnection/
    Be sure to use FileSystemRegistry.listRoots().
    And welcome to Java ME development. :)

  • EWA for java only systems - how to get ewa at the end

    Hi gurus,
    I have a solma system in which  all smd agent setup for portal was done and also all tasks (to collect data for EWA) are running well for ep systems aswel.
    We are at sps 17 in solman.
    I need to generated EWA for this portal system.I have no idea of how to generate it at the end.and i need that report routed to my mail.Some one please let me know how to generate EWA(after setup of every thing) and how to route it to mail address.
    Thank you.

    Hi ,
    Thanks for few inputs
    I have my EP system in system components in java (sub). and also in systems->netweaver->I have cinfigured my EP.But after this also I am unable to schedule it in DSWP.Can any one of you give some thoughts.(Seems I am missing some thing here - can any one let me know the procedure here to cross verify)
    Rohit,I followed that user guide with out missing a single point!.But still I am unable to pull my report..
    Tried manually with xml file(generated for EP from SM) and given it in DSM but it is saying no data available.
    Seems nothing is coming from my EP.
    Below are few exceptions in xml file.
    1) introscope data is missing
    Cannot find agent name Business-Sandbox_SEP_server0 for
    instance[IInstance: key=1178028371063144, type=[Server],
    nodeId=13865850, creation=Tue May 01 09:05:01 CDT 2007]
    for thie exception - not sure why my SM is not resolving EP's sid.
    Please not - SMD is  running fine in EP
    Any thoughts?
    2) PAR data is missing
    ORA-12505, TNS:listener does not currently know of SID given in connec descriptor
    The Connection descriptor used by the client was:
    Thank you.

Maybe you are looking for