Output text in table form

Hi all,
I have a short little applescript that does some math and then outputs a mix of the results and plain text in tabular form, and copies it into a Word document. (I'm a complete novice at AS, this is maybe my third script).
At present, the script essentially hand-writes the table by including the tabs and returns, e.g. this excerpt:
set gradingScale to "A+" & tab & Aplus & return & "A" & tab & Astraight & return
Is there a more efficient way to tell AS to output as a table? Like say, listing everything that belongs in column 1, or somesuch?
thanks, Daiya

table_result starts out at the top of the script as a blank string variable. In the example my repeat loop will run three times (the length of column_a) with the integer x. On each successive run x increases by 1, so we'll get the first, then second, then third items of column_a and column_b. Because we are fed these values one at a time, we must concatenate them to the values that we already got on previous runs through the repeat loop. By setting the value of table_result to itself, plus a bunch of new data, we can thus build the table line by line.
The result term is just a convenient way to get the result of the previous line of code. Here are a few more examples.
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">set x to 1
repeat 3 times
say x
set x to x + 1
end repeat
repeat with z from 3 to 1 by -1
say z
end repeat
"Go AppleScript!"
say result
</pre>

Similar Messages

  • Can I color a line of "standard text" in adobe forms output?

    Simple question: Can I color a line of "standard text" in adobe forms output?
    My standard text (SO10) has multiple lines. 
    Can I make one of the lines red?
    Ollie

    Hi Oliver,
    I believe you standard text is a table type of TDLINES.
    On the form you would display it with a table of 1 column 1 row with repeat row ticked.
    Have the like below code on the fomr ready event of your table.
    for(var i =0; i<this.Row1.nodes.length;i++)
         if(i == 1){
         this.Row1.Cell1.font.fill.color.value = "255,0,0";
         this.Row1.xx.font.fill.color.value = "255,0,0";
    Note: in my example I had a table with one row names Row1 and 2 fields cell1 type textbox,  & xx as text / label.
    If its like you have it in a text box with multiple entries, we need to spli the value such that 1st row is displayed in a text box whose parameters are by defeult set to font red, and rest of them to this text area.
    If your procedure is table the code sud work, else let me know how you get data and how do you display it on the screen.
    Cheers,
    Sai

  • Table Output text tool tip does not update on PPR

    We have a adf table with a Lov and a out put text .
    On changing the LOV, the out put text also change . but, on we mouse over on the tool tip does not changed . any suggestions ?
    below code :
    <af:outputText value="#{row.PlanTitle}" id="ot4" partialTriggers="soc3 si2"/>
    However , if we refresh the table or reload after save , the toop tip also get change . but we need to update the tool tip on change the lov . any suggestion ?
    Jdev : 11.1.1.3.0
    browser : all ,

    Hi,
    taking it from:
    +"However , if we refresh the table or reload after save , the toop tip also get change . but we need to update the tool tip on change the lov . any suggestion ? "+
    The autput text component is part of a table ? If so then the table needs to be refreshed as the values in there are stamped. If I am wrong with my table assumption and the output text is part of a form, try setting clientComponent="true" for the output text field
    Frank

  • Output Text values getting duplicated when UDF attached to view form

    Hi Experts,
    I am getting a error where the output text is having duplicated values, when i am trying to attach existing UDF to view form. Like for instance, as mentioned below:
    Phone Number - 23456789
    State - CACA
    Country - UnitedStatesUnitedStatesUnitedStates
    When i add COuntry UDF, first it printed UnitedStates once, When i add State UDF, the country UDF value came as two time (UnitedStatesUnitedStates). When i added UDF Phone Number, Phone number came once, But state came twice (CACA) and Country came thrice (UnitedStatesUnitedStatesUnitedStates) and so on.
    The following are the two contrasting scenarios.
    1. First, I used existing UDFs which we created longback and tried attaching to the view form, I am getting the error i mentioned.
    2. Second is I created two new UDFs and attached to the view form, i am not getting any error. Its printing all the values once.
    It happened that i already customized the view form using Data Component - Catalog instead of Data Component - manage User for view form customization. I published that sandbox. Then I realized that it was a mistake, so i created a new sandbox, removed all the fields and then published that sandbox. The view form came back to as it was before modification. After that, i created one more sandbox, tried attaching UDFs to view form using Data Component - manage User---> UserV01, i am getting the error of multiple values as i mentioned above.
    Please guide on what i can do further to solve the error. Thank you for your timie in advance.
    Regards

    Hi Nishith,
    I think it's only display issue. We have contacted oracle and raised an SR. they say it's fine when they recreate the same scenario. As i said, this isuue is only when we use existing UDFs and the sandbox is already published. Thats the complication now.

  • Output Types Replacement of text symbols: program, FORM routine needed

    Hello,
    I'm searching for a program and/or FORM routine that will replace &EKKO-EBELN& and &EKKO-LIFNR& (from Mail title and texts) .
    Example: Hochland Rahmenvertrag &EKKO-EBELN& / &EKKO-LIFNR&
    Replaced with: Hochland Rahmenvertrag 4600012345 / 712888
    I have problems filling the eMail subject when creating a Outline agreement (Apllication EV)...
    For purchase orders it's working without FORM routine (Apll. EF) !!!
    SAP provides this (empty) fields in transaction NACE (or NACT).
    Output type > Detail
    General Data > Replacement of text symbols
    appreciating any hints in this topic
    regards
    Jörg
    from SAP F1 context help:
    Program for creating or changing an output text
    Use
    In order to analyse parameters in titles of e-mails or faxes, you have to store a special program and a form routine in the field FORM routine. System fields like SY-UNAME or SY-DATUM are are excluded from this: They will be automatically analysed by the system.
    Example
    On New Year's Day 2000, you send the purchase order 4711 by fax. The title of the corresponding output type is "Purchase order no. VBAK-VBELN on SY-DATUM" (put a "&" before and after the fields). In the outbound message you therefore have the output "Purchase order no. 4711 on 01/01/2000". The field VBAK-VBELN has been filled with global data by a form routine.

    shital phadake wrote:
    > here are some hints
    > PR - SAPMM06B - Include MM06BFTE_TEXT_EDITIEREN - ?????
    > PO - SAPMM06E - Include MM06EFTE_TEXT_EDITIEREN - Form text_symbol_replace
    Great - these where the hints i was searching for
    NACE ...
    program = SAPMM06E
    form routine = TEXT_SYMBOL_REPLACE
    ...now the eMail subject is filled with PO-number and supplier-number as demanded ... and all just using SAP standard
    thx to you guys assisting me
    special thx to shital phadake
    Jörg

  • Iterate over some output text in a panel Grid

    Hello folks
    Are any of you doing something like this in JSC
    <code>
    <%
    for (int i = 0; i<4; i++)
    %>
    <h:panelGrid bgcolor="gray" binding="#{Page1.gridPanel1}" id="gridPanel1" style="height: 73px; left: 0px; top: 120px; position: absolute" width="216">
    <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="Author"/>
    <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="Summary"/>
    <h:outputText binding="#{Page1.outputText3}" id="outputText3" value="Article link"/>
    </h:panelGrid>
    <%
    %>
    </code>
    What I'm trying to do is something like data table, except that I want to have control over where the output text goes, and how it is presented.
    In data table all I get is a predefined table (I�m unable to format it the way I would like) so lets do it the old way - link some output text to a database or maybe an array which holds the "data" then loop over it x number of times to display the content kind of like this
    For (less than x times) do
    Author name
    Date article written
    Summary article
    Link to more of the article
    This would be the way I used to this, now I�m curios how this is done using JSF
    <% loop here %> does not mix well in Creator, error not well formed
    I�m unable to format a data table in any respect except number of rows and stuff
    So Any suggestion on how to really do this effectively in JSC/JSF
    Thanks Bjorn

    Hi,
    Actually, you have quite a bit of flexibility with the Data Table component.
    You can add more than one component to a column,
    and you can use an outputText component to hold
    HTML formatting tags, such as <br>.
    Note: you must uncheck the escape attribute.
    And since the data table component produces an HTML <table> tag,
    you can also control style with additional style sheet classes (see Tor's blog).
    For an example of using the Data Table component
    to display the resuts of the Google search web services,
    See Beyond the Book at this URL:
    http://www.asgteach.com/download/beyond.pdf
    The relevant description is section A.5 beginning on page 24.
    Hope this helps.
    --Gail A.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Long text in table control

    Hi SDN, Rich Please respond ..! <b>ITS VERY URGENT</b>
    i need a longtext in one of the table contol of my customised screen. the purpose of the screen is to create RFQ's where in user can enter LT ( just like the transaction IW32 - > Operations Tab - > LT Column. actually the LT in that table control is a button, pressing on which will take the user to an editor like SAP Script editor )
    <b>how do i save this into my customised tables so taht i display the LT in the display screen for RFQ's</b>
    This same LT created in RFQ Creation screen should be displayed to the users in another customised screens of RFQ Display / Change where the same functionality is needed.
    Please help me in achieving this, i have been struggling from past few days, and this is very urgent.
    i have been tryin the same with the fm's edit_text and read_text, but am not clear on these fm's related to HEADER in the importing parameters of the fm.
    is this wrong? or is there any other way to achieve my requirement?
    Please HELP
    Pratyusha

    Hi,
    Check this code..To display the text in a text editor control..
    First you have to create a custom control in your screen painter and name it as CONTAINER1..
      Then apply this code..
    TYPES: BEGIN OF type_text,
             line(70),
           END OF type_text.
    DATA: t_texttable1 TYPE STANDARD TABLE OF type_text.
    DATA: custom_container TYPE REF TO cl_gui_custom_container,
          editor TYPE REF TO cl_gui_textedit,
          repid LIKE sy-repid.
    repid = sy-repid.
    CALL SCREEN '0100'.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      PERFORM delete_container.
    *- Container franchise codes
      IF editor IS INITIAL.
        repid = sy-repid.
        CREATE OBJECT custom_container
           EXPORTING
              container_name = 'CONTAINER1'
           EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CREATE OBJECT editor
             EXPORTING
                parent = custom_container
              wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
               wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
                wordwrap_position = '38'
                wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
    *- Eliminate toolbar
        PERFORM toolbar.
      ENDIF.
      PERFORM load_data.
    Load TextEdit control with texts
      CALL METHOD editor->set_text_as_r3table
        EXPORTING table = t_texttable1.
      IF sy-subrc > 0.
      Display an error message
        EXIT.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                 " STATUS_0100  OUTPUT
          FORM delete_container                                         *
    FORM delete_container.
      IF NOT editor IS INITIAL.
        CALL METHOD editor->delete_text.
        CALL METHOD cl_gui_cfw=>flush
              EXCEPTIONS
                OTHERS = 1.
        IF sy-subrc > 0.
    Errormessage: Error in flush
        ENDIF.
      ENDIF.
    ENDFORM.                    " delete_container
          FORM toolbar                                                  *
    FORM toolbar.
      DATA: lv_toolbar_mode TYPE i VALUE 0.
      CALL METHOD editor->set_toolbar_mode
        EXPORTING
          toolbar_mode = lv_toolbar_mode.
      CALL METHOD cl_gui_cfw=>flush.
      IF sy-subrc > 0.
    Errormessage: Error in flush
      ENDIF.
    ENDFORM.                    " toolbar
    *&      Form  LOAD_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM load_data.
      DATA: gwa_line TYPE type_text.
    gwa_line-line = 'HELLO HOW ARE YOU!!!!!'.
    APPEND gwa_line TO t_texttable1.
    ENDFORM.                    " LOAD_DATA
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      DATA: T_SAVE_TEXT TYPE STANDARD TABLE OF TLINE.
      DATA: S_SAVE_tEXT TYPE TLINE.
      DATA: S_TEXT TYPE TYPE_TEXT.
    Load TextEdit control with texts
      CALL METHOD editor->get_text_as_r3table
        IMPORTING table = t_texttable1.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Hope this helps...
    Thanks,
    Naren

  • Dynamically create and remove TEXT items in forms

    Hi Guys,
    Is there a way to dynamically create and remove TEXT items in form. For example I have the EMP and DEPT table and when
    I select the EMP table name from the LOV, rows of the EMP table with column name and data should get displayed on the screen and likewise a similar action for DEPT table and
    so on. I have about 90 tables from where data could be required to view and edit. They all have varying number of columns.
    Any suggestions ?
    Thanks
    KMD
    null

    Use OLE concept of developer and map Excel as an object
    Nadeem
    null

  • Text in ADOBE form not printing while printing the form

    Hi All,
    I have created an adobe form and am trying to trigger an output linked to the form. The problem is that the output that gets triggered does not show some of the texts which are existing in the form.
    So although the values are coming correctly the overall output becomes incorrect as the text goes missing. Let me know if you have any pointers to the issue I am facing.
    Cheers,
    Sharadendu

    Hi Sharadendu,
    First of all you need to put this question in Adobe Form related Forums.
    Problems can be many in this case.
    1: Overflow subform not selected.
    2: Some condition failing in the text or subform.
    3: Incorrect nesting of subforms.
    Mainly your problem will be with the subforms , so you need to croos check all the subforms which you have used to hold data.
    Regards,
    Sandeep Katoch

  • Standard text in Smart forms

    Hi ,
               Im using the standard text in smart forms, but Im getting the output displayed as hexadecimal numbers. These are the hexa characters stored in the "SO10" transaction for the standard text name.
    I try to display a signature stored in standard text.
    But when used in SAP scripts I get the content displayed correctly.
    Can someone help me to display the content in smart forms as such.
    I searched the forum for the solution I got some results for the search but I did not get the solution for it.
    Points will be rewarded for helpful answers...
    Rgds,
    Sarath.
    Message was edited by:
            Sarath kumar Chandrasekharan

    Rama,
    The problem is the signature is in standard text.
    Message was edited by:
            Sarath kumar Chandrasekharan

  • Standard Text IN ADOBE Forms

    Hi,
    Can you tell me how to use standard text in ADOBE forms,
    and how to fetch A Customs Tariff Number or an HTS (Harmonized Tariff System)
    from other system.

    Hi Oliver,
    I believe you standard text is a table type of TDLINES.
    On the form you would display it with a table of 1 column 1 row with repeat row ticked.
    Have the like below code on the fomr ready event of your table.
    for(var i =0; i<this.Row1.nodes.length;i++)
         if(i == 1){
         this.Row1.Cell1.font.fill.color.value = "255,0,0";
         this.Row1.xx.font.fill.color.value = "255,0,0";
    Note: in my example I had a table with one row names Row1 and 2 fields cell1 type textbox,  & xx as text / label.
    If its like you have it in a text box with multiple entries, we need to spli the value such that 1st row is displayed in a text box whose parameters are by defeult set to font red, and rest of them to this text area.
    If your procedure is table the code sud work, else let me know how you get data and how do you display it on the screen.
    Cheers,
    Sai

  • Standard text in smart form

    Hi,
    can anyone tell me how to include standard text in smart form
    Thanks

    Procedure
    1. To create a text node, call the context menu for that node in the tree structure that shall
    receive the text and choose Create Text.
    2. Enter a unique name for the node and a node description (for example, letter).
    3. On the General Attributes tab choose Include text as text type.
    Since you edit a text element, an included text, or a text module exclusively via the
    text node, the system stores only information on the selected type. When you
    change the text type, the system therefore asks for your confirmation.
    4. In the Text key box, identify the include text.
    To identify individual text objects, use the search help in this field.
    The search help of the Text name field allows you include the attributes of SAPscript
    texts into the search.
    7. If required, use the Paragraph formats box to format the include text:
    The style assigned to the text node contains a format for the standard paragraph ('*'). If you enter a paragraph format in the Standard paragraph field, this format overwrites the style format for all standard paragraphs in the include text that use this paragraph format.
      Use the First paragraph field to set a paragraph format for the first paragraph of the
    include text. This format also overwrites the format set in the style. If you set the First
    paragraph field but leave the Standard paragraph field empty, the system uses the
    format set in the First paragraph field for any standard paragraphs in the include text.
    6. In the Text node box choose whether you want the text to start in a new paragraph, in a new
    line, or directly at the end of the current paragraph.
    7. If desired, choose the Output Options tab to maintain the style or box and shading
    of the text.
    Result
    The system displays the node in the tree structure, including its name and description. The
    included text is included only at the moment the form is processed.
    Regards

  • Regading Including Text in Smart forms

    Hi gurus,
    In vf02 they are giving some text . that text is going and saving in STXL table. I want to include this text in smart form.
    After choosing include text in General attributes. I am giving
    text object is vbbk
    Text id is time
    language en
    but i don't know what i want to give in text name.
    so plz help me.
    S.Murali Naidu
    Edited by: Murali Sreerama on Feb 6, 2008 10:12 AM

    Hi,
    Please use this code:: (reward pts)
    DATA gt_text LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: gt_lines.
    REFRESH gt_text.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        id                            = 'your text id'
        language                      = sy-langu
        name                          = your billing doc no
        object                        = 'your obj id'
       ARCHIVE_HANDLE                = 0
       LOCAL_CAT                     = ' '
    IMPORTING
       HEADER                        =
      tables
        lines                         = gt_text
    EXCEPTIONS
       ID                            = 1
    LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR: gt_line7,
    gt_lines.
    then to display that
    LOOP AT   gt_text.
    IF NOT gt_text-tdline IS INITIAL.
    CONCATENATE gt_line gt_text-tdline INTO gt_line SEPARATED BY space.
    ENDIF.
    ENDLOOP.
    Edited by: rohitaash sharma on Feb 6, 2008 10:22 AM

  • Purchase requisition header text in smart forms

    Dear Experts,
        i want to pick the header text in smart form from purchase requisition ( Transaction code me52n).Can any one tell me from which table i can find out the header text of purchase requsition. please tell me table name objectid for include.
    Thanks in advance.
    Regards
    Maqsood Ahmed

    Hi,
    Go to the screen where the long text is placed, From menu bar go to the header you will get the Object details.
    Use FM READ_TEXT by passing those object details you will get the text.
    Have a look in this link to use READ_TEXT
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+general&
    Regards,
    Satish

  • Background colout to text in Smart forms

    Hi Folks,
        I have a requirement to take colored print out from Smart forms. I have to assign background color to the text in Smart Forms. Is it is possible? If yes, then how it can be done?
    Thanks in Advance,
    Punit

    Hi Punit,
    Yes definitely it is possible to do so. Just follow few steps mentioned below
    1. Select the text node for which you want the background color.
    2. Click on the output tab.
    3. In the shading option, choose the color yuo want in background.
    4. save activate and thats all..........its done..
    Let me know if you ave any prob in this..
    Enjoy SAP.
    Pankaj Singh.

Maybe you are looking for

  • Exception in ForEach block causes it to stop

    My scenario is a JDBC to JDBC to File scenario. The JDBC sender returns a resultset of a few transaction Ids. I then need to call a SP with each transaction id one by one to return more details. I am doing this by going to BPM, splitting the transact

  • Do we see an Error Message at the Spreadsheet Level?

    My Interface is a Table - PA_TRANSACTION_INTERFACE_ALL I am using Oracle Standard Importer to pick data from PA_TRANSACTION_INTERFACE_ALL and load to PA base tables. I have defined Error setups as below. My expectation is, if there is any validation

  • Inbound 855 EDI PO Acknowledgement Transaction

    We are trying to take an 855 EDI PO Acknowledgement Transaction, and have the price on the PO and the delivery date on the PO automatically change. When we process the IDoc for the 855 EDI PO acknowledgement, we can see that the new delivery date is

  • How to use Heirarchical Tree to call others forms

    Dear All: I need to use a Heirarchical Tree in the MAIN Page to call ALL FORMs that I made. I mean when I click the node I can get the specified form. Would you please provide me with an example how to make it. Cheers

  • Oracle XE limitations

    Excuse the newbie question. I know that Oracle XE has a limit of 4g on the size of a DB. Can you have multiple DBs? We currently support our small customers on JET. They have large projects with seismic data. It can add up to bigger than 4G quickly i