How to Add Input Values into a XML in Flex AIR Application

I need a help, now I am developing a flex windows AIR application, in this I am displaying data using a xml file,
I have some input fields in my application,if the application user filled the input field and press submit button, the inputs
Should be stored in that xml. How can I do this using flex, can you  anyone please provide me a sample file with tutorial.
Thanks in advance
Vasanth,
Chennai

You can use the "+" operator which is both the addition (number) and concatenation (string) operator. JavaScript makes the decision about how this operator will work by the type of the value of being processed. Two numbers JavaScript performs addition, character string and number, number and character string, or 2 character strings then concatenation.
If you just use the '+' operator and spaces, you will get extra spaces unless you add code to allow for null fields and adjusting the spacing or other punctuation as needed. You may also need to force numeric values to character stings or you might end up with an addition and not concatenation.
Adobe provided a example of a funciton to properly join 3 fields with full versions of Acrobat:
function fillin(s1, s2, s3, sep) {
  // Concatenate 3 strings with separators where needed
  // convert passed strings to a string value
  s1 = s1.toString();
  s2 = s2.toString();
  s3 = s3.toString();
  // assign a numeric value for presence of a given string(s)
  var test = 0; // no passed strings
  if (s1 != "") test += 1; // s1 has a value
  if (s2 != "") test += 2; // s2 has a value
  if (s3 != "") test += 4; // s3 has a value
  // return appropriate combination based on passed strings
  if (test == 0) return ""; // no stings passed
  if (test == 1) return s1; // s1 only
  if (test == 2) return s2; // s2 only
  if (test == 3) return s1 + sep + s2; // s1 and s2
  if (test == 4) return s3; // s3 only
  if (test == 5) return s1 + sep + s3; // s1 and s3
  if (test == 6) return s2 + sep + s3; // s2 and s3
  if (test == 7) return s1 + sep + s2 + sep + s3; // s1, s2, and s3

Similar Messages

  • How to add one value into Input Entry Screen of Element

    Hi ,
    How to change the "Input Value" of Element which has already been processed and assigned. Its not allowing to update even though its been date tracked.
    I want to add one more Value into Input Value screen.
    Thanks
    Ram

    You cannot remove existing input values or add new one if you have created any entries for the element
    to know more details to maintain an element you can refer the following link
    http://ramesh-oraclehrms.blogspot.com/2007/08/maintaining-element.html
    Regards
    Ramesh Kumar S

  • How to write input data into an xml file

    Hi All,
           I have some input data and i have to write it
    into an xml file.How is it possible send me some related
    links regarding this and source code if any.

    Hi
    Try to go through these links.I hope this will help you to solve your problem.
    http://www.xml.com/pub/a/2003/07/09/udell.html
    Thanks
    Mrutyunjaya Tripathy

  • How to add form values into a single line...

    How can we add numerous form values (say surname, first name and middle initial) into a single line? thanks in advance^^  

    You can use the "+" operator which is both the addition (number) and concatenation (string) operator. JavaScript makes the decision about how this operator will work by the type of the value of being processed. Two numbers JavaScript performs addition, character string and number, number and character string, or 2 character strings then concatenation.
    If you just use the '+' operator and spaces, you will get extra spaces unless you add code to allow for null fields and adjusting the spacing or other punctuation as needed. You may also need to force numeric values to character stings or you might end up with an addition and not concatenation.
    Adobe provided a example of a funciton to properly join 3 fields with full versions of Acrobat:
    function fillin(s1, s2, s3, sep) {
      // Concatenate 3 strings with separators where needed
      // convert passed strings to a string value
      s1 = s1.toString();
      s2 = s2.toString();
      s3 = s3.toString();
      // assign a numeric value for presence of a given string(s)
      var test = 0; // no passed strings
      if (s1 != "") test += 1; // s1 has a value
      if (s2 != "") test += 2; // s2 has a value
      if (s3 != "") test += 4; // s3 has a value
      // return appropriate combination based on passed strings
      if (test == 0) return ""; // no stings passed
      if (test == 1) return s1; // s1 only
      if (test == 2) return s2; // s2 only
      if (test == 3) return s1 + sep + s2; // s1 and s2
      if (test == 4) return s3; // s3 only
      if (test == 5) return s1 + sep + s3; // s1 and s3
      if (test == 6) return s2 + sep + s3; // s2 and s3
      if (test == 7) return s1 + sep + s2 + sep + s3; // s1, s2, and s3

  • How to pass apex item value into custom xml for chart or guage?

    Re-opening the old thread : Re: How to pass apex item value into custom xml for chart or guage?
    Which was not answered.
    Roel - Thanks. Its working - but in a semi quotes in the custom XML
    <pointers>
    <pointer value= '&P5_RUNNING_TOTAL.'
    <label enabled="true">
    <position placement_mode="ByPoint" x="50" y="15" />
    <format>{%Value}{numDecimals:1}</format>
    <background enabled="false" />
    </label>
    </pointer>
    </pointers>This question was helpful for us to resolving one recent thread : AnyChart - set Dial axis intervals dynamically?
    (Re: AnyChart - set Dial axis intervals dynamically?
    Edited by: P.Ranish on Dec 13, 2012 6:23 AM

    P.Ranish wrote:
    Is there any update for this question ???
    Edited by: P.Ranish on Dec 13, 2012 3:36 AMNo, And there won't be in the future.
    Please stop posting followup's to old threads, if you have a real problem please search the forum first and post a new question with all information
    Roel wrote:
    Try using &P5_RUNNING_TOTAL. or #P5_RUNNING_TOTAL#Just to make it clear - this will only work if page is reloaded after setting the item values dynamically via AJAX

  • How to add new field into dynamic internal table

    Hello Expert.
    how to add new field into dynamic internal table.
    PARAMETERS: P_TABLE(30).    "table name
    DATA: I_TAB TYPE REF TO DATA.
    FIELD-SYMBOLS: <TAB> TYPE standard TABLE.
    *Create dynamic FS
    create DATA I_TAB TYPE TABLE OF (p_table).
      ASSIGN I_TAB->* TO <TAB>.
    SELECT * FROM (p_table) INTO TABLE <TAB>.
       here i want to add one more field into <TAB> at LAST position and my 
       Field name  =  field_stype     and
       Field type    =  'LVC_T_STYL'
    could you please helpme out .

    Hi,
    Please find the code below.You can add the field acc to your requirement.
    Creating Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,  u201C Dynamic internal table name
                   <fs_dyntable>,                     u201C Field symbol to create work area
                   <fs_fldval> type any.              u201C Field symbol to assign values 
    PARAMETERS: p_cols(5) TYPE c.                     u201C Input number of columns
    DATA:   t_newtable TYPE REF TO data,
            t_newline  TYPE REF TO data,
            t_fldcat   TYPE slis_t_fldcat_alv,
            t_fldcat   TYPE lvc_t_fcat,
            wa_it_fldcat TYPE lvc_s_fcat,
            wa_colno(2) TYPE n,
            wa_flname(5) TYPE c. 
    Create fields .
      DO p_cols TIMES.
        CLEAR wa_it_fldcat.
        move sy-index to wa_colno.
        concatenate 'COL'
                    wa_colno
               into wa_flname.
        wa_it_fldcat-fieldname = wa_flname.
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 10.
        APPEND wa_it_fldcat TO t_fldcat.
      ENDDO. 
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = t_fldcat
        IMPORTING
          ep_table        = t_newtable. 
      ASSIGN t_newtable->* TO <t_dyntable>. 
    Create dynamic work area and assign to FS
      CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
      ASSIGN t_newline->* TO <fs_dyntable>.
    Populating Dynamic internal table 
      DATA: fieldname(20) TYPE c.
      DATA: fieldvalue(10) TYPE c.
      DATA: index(3) TYPE c. 
      DO p_cols TIMES. 
        index = sy-index.
        MOVE sy-index TO wa_colno.
        CONCATENATE 'COL'
                    wa_colno
               INTO wa_flname. 
    Set up fieldvalue
        CONCATENATE 'VALUE' index INTO
                    fieldvalue.
        CONDENSE    fieldvalue NO-GAPS. 
        ASSIGN COMPONENT  wa_flname
            OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
        <fs_fldval> =  fieldvalue. 
      ENDDO. 
    Append to the dynamic internal table
      APPEND <fs_dyntable> TO <t_dyntable>.
    Displaying dynamic internal table using Grid. 
    DATA: wa_cat LIKE LINE OF fs_fldcat. 
      DO p_cols TIMES.
        CLEAR wa_cat.
        MOVE sy-index TO wa_colno.
        CONCATENATE 'COL'
                    wa_colno
               INTO wa_flname. 
        wa_cat-fieldname = wa_flname.
        wa_cat-seltext_s = wa_flname.
        wa_cat-outputlen = '10'.
        APPEND wa_cat TO fs_fldcat.
      ENDDO. 
    Call ABAP List Viewer (ALV)
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat = fs_fldcat
        TABLES
          t_outtab    = <t_dyntable>.

  • How to add a report into the SAP-SCRIPT .using PERFORM ......ENDPERFORM

    My question is that How to add a report into the SAP-SCRIPT .
    by using PERFORM ......ENDPERFORM
    I don't know how to used it .

    Hi Sandeep,
    Please check this link
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    http://www.allinterview.com/showanswers/37425.html
    Calling ABAP Subroutines: PERFORM
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (u2018First pageu2019, u2018Next pageu2019, u2018Last pageu2019) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Best regards,
    raam

  • Is there possibility to add dimension value into hierarchy using dml or spl

    1 Is there possibility to add dimension value into hierarchy using dml or spl?
    If such possibility exists how to do that.
    2 Is it possible to sort dimension values inside one branch of the hierarchy?

    What version of OLAP are you using and how did you create your AW (e.g., AWM)?
    Assuming that you're used either AWM or the Java API for AWs in 10g, there isn't an OLAP DML for adding a dimension member to a dimension (and have all the meta data kept in sync); you must load dimension members using AWM the Java API for AWs.
    So, make your changes in the the dimension table and process that table.
    For sorting, you can add a sort attribute to the dimension. Add the sort attribute to the model, indicate that it's used for sorting, add the sort attribute to your dimension table and maintain the dimension.

  • How to convert HL7 file into an XML

    Hi All,
    I am new to HL7,can any one tell how to convert HL7 file into an XML.Give sample demo or related links.
    My sample HL7 file is as follows how can I convert.
    FHS|^~\&||Tax ID123^Lab Name123^L|||201110191435||HL7.txt||1234567|123||
    PID|seqno|123||john^chambers^^Dr^Dr|2456 california ave^San jose^CA^85254|19601212|M
    FHS|^~\&||Tax ID123^Lab Name123^L|||File Creaqted Date|File Security|FileName||File HeaderComment||Facility|FileCreatedDateTime|File Security|File Name|File Header Comment|FileControlId|Reference File Control ID|
    PID|seqno|patientId||LastName^FirstName^MiddleName^Title^Degree|Street^City^State^zip|patientDOB|gender
    <Report>
    <FileHeader>
    <FileSendingApplication> </FileSendingApplication>
    <TaxID>Tax ID123</TaxID>
    <LabName>Lab Name123</LabName>
    <FileSendngFacilityType>L</FileSendngFacilityType>
    <FileReceivingApplication></FileReceivingApplication>
    <FileReceivingFacility></FileReceivingFacility>
    <FileCreatedDateTime>201110191435</FileCreatedDateTime>
    <FileSecurity></FileSecurity>
    <FileName>HL7.txt</FileName>
    <FileHeaderComment></FileHeaderComment>
    <FileControlId>1234567</FileControlId>
    <ReferenceFileControlID></ReferenceFileControlID>
    <FileHeader>
    <Patient>
    <seqno> </seqno>
    <patientId>Tax ID123</patientId>
    <LastName>Lab Name123</LastName>
    <FirstName>L</FirstName>
    <MiddleName></MiddleName>
    <Title> </Title>
    <Degree></Degree>
    <Street></Street>
    <City></City>
    <State>HL7.txt</State>
    <Zip></Zip>
    <patientDOB>1234567</patientDOB>
    <gender></gender>
    <Patient>
    </Report>
    Thanks
    Mani

    Hi Prabu,
    With input as in single line I'm able to get the the output but with the multiple lines of input,error was occured.Any suggestions.
    Error while translating. Translation exception. Error occured while translating content from file C:\temp\sampleHL7.txt Please make sure that the file content conforms to the schema. Make necessary changes to the file content or the schema.
    The payload details for this rejected message can be retrieved.          Show payload...
    Thanks
    Mani

  • How to add integer value of two buttons?

    how to add integer value of two buttons (any button) in VI and display it in output text box? i have attached example program, but i know its wrong.. please help
    Solved!
    Go to Solution.
    Attachments:
    add.vi ‏8 KB

    thanks for reply. i am trying to assign an integer value to a button and the button should send the assigned integer value to TCP/IP write, only when the button is pressed. i am able to send data using string control (as shown in the attachment) but i want to replace it with several buttons. for example, if i enter 2 in string control, this data will be sent to a robot (robot has wifi card)  through tcp/ip protocol, it moves front. 3 will make it to move back, 8 is left, 6 is right. this numeric data is already burnt into blackfin processor of the robot. so just by entering numbers in labview can make my robot move in specified direction. can you please help me to create a button with value and convert it into string and send it to tcp/ip write. this should happen only when the button is pressed. because, if i enter numbers in string control, it dosent looks good..... if i have buttons... i think my VI will look good and hitech.
    Attachments:
    robo.vi ‏9 KB

  • How to set variable value in an XML array

    Hi,
    Please let me know how to set the value for a xml array element using assign activity inside a for-each block in BPEL 11g
    I tried to set the variable value for result element using the below condition but i encountered selection failure message
    $outputVariable.payload/ns1:Student['i']/ns1:result or
    $outputVariable.payload/ns1:Student[$i]/ns1:result
    And the xsd used is as below
    <xsd:complexType name="StudentCollection">
    <xsd:sequence>
    <xsd:element name="Student" type="Student" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Student">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="location" type="xsd:string"/>
    <xsd:element name="mark" type="xsd:string"/>
    <xsd:element name="result" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    Thanks,
    Dhana

    Hi,
    At the back of button specify the following parameter:-
    CMD    1        Execute_planning_function
    Planning_function_name  1   xyz
    Var_name     1    variable_name
    var_value      1    blank
    Can also refer to link below:-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0a89464-f697-2910-2ba6-9877e3088954?quicklink=index&overridelayout=true(can refer to page 20)
    http://www.sdn.sap.com/ddc5564a-337d-4cf9-a34e-2dab64df09be/finaldownload/downloadid-a61a6724ba8e7b7fbd9c5df9590ab50d/ddc5564a-337d-4cf9-a34e-2dab64df09be/irj/scn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be?quicklink=index&overridelayout=true
    Hope it may help

  • How to add an item into the Newsstand

    How to add an item into the Newsstand.  Please do NOT reply using  "tech-language." Use standard- normal everyday English. Thanks,
    Don Otlin
    Franklin Square, NY

    Open Newsstand. Tap on the "Store" button in the upper right. Any newspaper or magazine you download from the store will appear in Newsstand.

  • How to add PDF files into a slides? (Flash 8)

    I am new to flash and I am using Macromedia Flash 8. My task is simple enough: I need create a Presentation with Screens from PDF files: I have 10-12 PDF files which I want convert into flash presentation.
    I have read this tutorial:
    http://w3.id.tue.nl/fileadmin/id/objects/E-Atelier/Phidgets/Software/Flash/fl8_tutorials.p df
    Chapter 11: Basic Tasks: Create a Presentation with Screens.
    I'm having trouble how to add PDF files into a slides: I want insert a whole pdf file as separate slide, without splitting pdf file into separate elements: pictures, text, etc. I tried import pdf file into Flash, wheen import there is shown prompt how program should process this pdf file(add in stage, library, as keyframes, etc) , not clear which option is correct for my task. What I got is pdf file splitted into multiple images, text, - which is not what I want. I want keep PDF files without changes, preserve original design and formatting, just convert this pdf into flash, so presentation will consist of PDFs organized in correct order, then add navigation buttons and some effects. How to solve this task?

    Just to avoid potential confusion... PDF is an Adobe format, but Flash 8 is/was not.  Flash 8 came out before Adobe bought Macromedia.  Even today, I don't believe anything has been done to accomodate direct integration of PDF content in Flash.

  • Asset related question - How to add a record into table ANLC?

    Hello experts,
    Could anyone tell me how to add a record into table ANLC?
    Thanks very much!
    Christina.

    how you want add?
    you want add direct in table???.
    Normally if yo post any transaction this table will update.
    ex;acquisition;
    chandra

  • In Scom,How to add CAC value in given MP (management pack)? Please give me in detail procedure with example if possible.

    In Scom,How to add CAC value in given MP (management pack)? Please give me in detail procedure with example if possible.

    Hi 
    CAC is System.ConsolidatorCondition condition detection module used to consolidate the monitoring i.e. you can generate an alert on multiple occurrence of issues instituted of generating single alert for issue.
    refer below link for more information
    http://msdn.microsoft.com/en-us/library/ee809324.aspx
    http://social.technet.microsoft.com/wiki/contents/articles/20301.how-to-add-consolidation-for-url-monitoring-in-scom-20072012.aspx
    Regards
    sridhar v

Maybe you are looking for