passing values from unix to oracle

Hello

I need to pass a variable in unix to oracle as an argument

I use oracle 9i and HP - UNIX

for ex, I need to run a sql on UNIX with different values as test.sql script 1, test.sql 2...

I need to pass the values (1, 2.etc) to sql script shell script.

It's very urgent. could you please provide an example of script for this.

URGENT?  :|

Unix>  sqlplus user/pass@db @script.sql $1 $2 $3
#---where $1 $2 $3 are unix variables 

Unix> sqlplus user/pass@db @script.sql 1 2 3
#---where 1 2 3 are literal values 

SS

Tags: Database

Similar Questions

  • How can I pass values from one node to the other

    Give a standard and efficient way to pass values of the child to the parent

    Hai Prathap

    You can use the custom event to pass values from the children to the parent

  • Retrieving values from XML in Oracle 9i - part II

    Hello

    regarding my previous post retrieving values of XML in Oracle 9i , I now have a different requirement.

    Assuming that the XML is as follows:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < GenericRequest xmlns =" http://webservices.mysite.com/test "xmlns:ns =" " http://webservices.mysite.com/test/NS "xmlns:ns1 =" " http://webservices.mysite.com/test/ns1 "xmlns:ns2 =" " http://webservices.mysite.com/test/ns2 ">

    < ns1:order >

    < ns1:orderItems >

    < ns1:orderItem >

    create < ns1:operation > < / ns1:operation >

    < ns1:brickId > TST002 < / ns1:brickId >

    < ns1:brickAttributes >

    < ns1:attribute >

    < ns2:name > COUNTRY < / ns2:name >

    < ns2: value > U.S. < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CUST_ID < / ns2:name >

    < ns2: value > 12345 < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CITY < / ns2:name >

    < ns2: value > New York < / ns2: value >

    < / ns1:attribute >

    < / ns1:brickAttributes >

    < / ns1:orderItem >

    < ns1:orderItem >

    Update < ns1:operation > < / ns1:operation >

    < ns1:brickId > TST001 < / ns1:brickId >

    < ns1:brickAttributes >

    < ns1:attribute >

    < ns2:name > COUNTRY < / ns2:name >

    < ns2: value > U.S. < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CUST_ID < / ns2:name >

    < ns2: value > 22222 < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CITY < / ns2:name >

    < ns2: value > Los Angeles < / ns2: value >

    < / ns1:attribute >

    < / ns1:brickAttributes >

    < / ns1:orderItem >

    < / ns1:orderItems >

    < / ns1:order >

    < / GenericRequest >

    As you can now see the XML contains several elements of the order. For each agenda item, I have a single operation and a brick_id. Then, for each item on the agenda, I have a list of brickAttributes (name and value).

    How can I get something like that?

    OPERATION BRICK_ID NAME VALUE

    --------- -------- ------- -----------

    create TST002 COUNTRY WE

    create TST002 CUST_ID 12345

    create TST002 New York CITY

    update of TST001 COUNTRY United States

    Update TST001 CUST_ID 22222

    Update TST001 CITY Los Angeles

    Version of database is 9.2.0.8

    SELECT * FROM version of v$.

    BANNER

    ----------------------------------------------------------------

    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production

    PL/SQL Release 9.2.0.8.0 - Production

    CORE Production 9.2.0.8.0

    AMT for HP - UX: 9.2.0.8.0 - Production Version

    NLSRTL Version 9.2.0.8.0 - Production

    Kind regards.

    Alberto

    Response of Odie, result is that extend

    with sample_data as (
    select xmltype(
    '
    
              
                
                  
                    create
                    TST002
                    
                      
                        COUNTRY
                        US
                      
                      
                        CUST_ID
                        12345
                      
                      
                        CITY
                        New York
                      
                    
                  
                  
                    update
                    TST001
                    
                      
                        COUNTRY
                        US
                      
                      
                        CUST_ID
                        22222
                      
                      
                        CITY
                        Los Angeles
                      
                    
                  
                
              
    ') xmldoc
    from dual
    )
    select extractvalue(value(x), 'ns1:orderItem/ns1:operation', 'xmlns:ns1="http://webservices.mysite.com/test/ns1"') as operation
         , extractvalue(value(x), 'ns1:orderItem/ns1:brickId', 'xmlns:ns1="http://webservices.mysite.com/test/ns1"') as brick_id
         , extractvalue(value(y), 'ns1:attribute/ns2:name', 'xmlns:ns1="http://webservices.mysite.com/test/ns1", xmlns:ns2="http://webservices.mysite.com/test/ns2"') as name
         , extractvalue(value(y), 'ns1:attribute/ns2:value', 'xmlns:ns1="http://webservices.mysite.com/test/ns1", xmlns:ns2="http://webservices.mysite.com/test/ns2"') as value
    from sample_data t
       , table(
           xmlsequence(
             extract(
               t.xmldoc
             , '/GenericRequest/ns1:order/ns1:orderItems/ns1:orderItem'
             , 'xmlns="http://webservices.mysite.com/test", xmlns:ns1="http://webservices.mysite.com/test/ns1"'
             )
           )
         ) x
       , table(
           xmlsequence(
             extract(
               value(x)
             , 'ns1:orderItem/ns1:brickAttributes/ns1:attribute'
             , 'xmlns:ns1="http://webservices.mysite.com/test/ns1"'
             )
           )
         ) y
    ;
    

    As shown, it simply retrieves to a higher level object that repeats once in table x and happening at the table there, which returns the expandable nodes.  The join is managed by value (x) in the second simple table.  It assumes that there is always 1 or several nodes of ns1:attribute in each ns1:orderItem.

  • Passing values from a CO of a page in the xml file of a field with LOV.

    Hello

    I have 2 pages in this CUSTOMIZATION and the 2nd page got fields that have their turn to LOV.

    The query behind the LOV is sitting in the XML file and as an amendment to this motion, he needs some dynamic values

    I got to a stage where in the Commander of the 2nd page I set up values using getparameters.

    But how to pass this value from the 2nd page to the XML FILE.

    Thank you

    Regis

    Hi Regis

    Leave; s first focus on your first build errors. You said very well reconstruction work but compilation error comes when you run the page.

    It's strange. Can you please confirm if you have added the OFA libraries to your project. Ideally, they should be there once you create an OA project

    Concerning

    Marie Lise S

  • Passing values from one scene to the other

    Hello, how can I pass a value from a textbox in scene1 to another area of text that is in scene2?

    In scene 1, you might have...

    var str:String = t1.text;

    and to scene 2, you might have...

    T2. Text = str;

  • How to pass values from one form to the other setting

    Hello

    I have created two forms Form_A and Form_A. Form_B, having a button "submit" and called the new form of B.
    I have done some calculations in form B. Now I want to spend this calculation value back to Form_A when I press
    My Exit in Form_B button.

    In FormA, just before calling FormB declare and initialize a global variable

    :GLOBAL.PASS_BACK := ''; -- declaration and initialization
    CALL_FORM(FORMB,....);
    --> At this point the :GLOBAL.PASS_BACK variable should have the calculated value from FormB
    

    In the B form to trigger after CHANGE calculated item or KEY of VALIDATION or WHEN - click the BUTTON to exit FormB write - anywhere after the calculation were made

    :GLOBAL.PASS_BACK := ;
    

    For more details, search for the global variables in the form builder help.

    Kind regards

  • Oracle apex 5.0: pass values from one page to the other as well save you can save same value in the table.

    I use oracle apex 5.0

    Issues related to the:

    (1) I created an application where I have a form on which I have a button named 'Add', now if I click on that button values need to be stored in table.how to create! I use the dynamic button that is created by the html tag < input type = "button" > need help with this.

    (2) if the value stored in the table how the same value will be on the agenda of the calling page. ?

    New to this world of Apex.

    concerning

    Pranav shah

    http://zderadicka.EU/Apex-dynamic-actions-with-report-region/

  • Retrieving values from XML in Oracle 9i

    Hello

    I have the following XML:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < GenericRequest xmlns =" http://webservices.mysite.com/test "xmlns:ns =" " http://webservices.mysite.com/test "xmlns:ns1 =" " http://webservices.mysite.com/test "xmlns:ns2 =" " http://webservices.mysite.com/test ">

    < ns1:order >

    < ns1:orderItems >

    < ns1:orderItem >

    create < ns1:operation > < / ns1:operation >

    < ns1:brickId > TST123 < / ns1:brickId >

    < ns1:brickAttributes >

    < ns1:attribute >

    < ns2:name > COUNTRY < / ns2:name >

    < ns2: value > U.S. < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CUST_ID < / ns2:name >

    < ns2: value > 12345 < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CITY < / ns2:name >

    < ns2: value > New York < / ns2: value >

    < / ns1:attribute >

    < / ns1:brickAttributes >

    < / ns1:orderItem >

    < / ns1:orderItems >

    < / ns1:order >

    < / GenericRequest >

    And I use an older version of Oracle (it's something I can't change unfortunately):

    SELECT * FROM version of v$.

    BANNER

    ----------------------------------------------------------------

    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production

    PL/SQL Release 9.2.0.8.0 - Production
    CORE Production 9.2.0.8.0
    AMT for HP - UX: 9.2.0.8.0 - Production Version
    NLSRTL Version 9.2.0.8.0 - Production

    What is the best way to get the list name / value in a format like this with a SQL query?

    VALUE NAME

    ------- --------

    COUNTRIES WE

    CUST_ID 12345

    New York CITY

    Kind regards.

    Alberto

    Hello Alberto,.

    You can do it like this:

    with sample_data as)

    Select xmltype)

    '

    "http://WebServices.mysite.com/test" xmlns:ns ="http://webservices.mysite.com/test" xmlns:ns1 ="http://webservices.mysite.com/test" xmlns:ns2 = "http://webservices.mysite.com/test" >. "

    create

    TST123

    COUNTRY

    WE

    CUST_ID

    12345

    CITY

    New York City

    xmlDoc ')

    of the double

    )

    Select extractvalue (value (x), ' / ns1:attribute / ns2:name ',' xmlns:ns1 is "http://webservices.mysite.com/test", xmlns:ns2 ="http://webservices.mysite.com/test" "" ") as the name

    ExtractValue (value (x), ' / ns1:attribute / ns2: value ',' xmlns:ns1 = "http://webservices.mysite.com/test", xmlns:ns2 ="http://webservices.mysite.com/test" "" ") as the value

    of sample_data t

    table)

    xmlsequence)

    extract)

    t.xmlDoc

    , ' / GenericRequest / ns1:order / ns1:orderItems / ns1:orderItem / ns1:brickAttributes / ns1:attribute'

    ", ' xmlns ="http://webservices.mysite.com/test", xmlns:ns1 ="http://webservices.mysite.com/test"". "

    )

    )

    ) x

    ;

    Namespace URI appear to be the same in your example of XML, if this is really the case, you can simplify the query and use the same namespace by default in any of the query.

  • APEX - passing values from one page to the other

    Hello

    I created a new page with a report. I put one of the columns as a link that opens another page. This page should contain other details of the particular line.

    For example:
    There is a page with a list of employee names and the number of employees in both columns. When I click on the name of employee, he must open another page with additional details of the employee in particular (such as date of birth, e-mail etc.).

    What I'm trying at the moment is to create another page with a report inside. How do I pass the name of the employee as a parameter to this second page? And how do I do the query in the second page accept this setting?

    Is there a better way to do this?

    Kind regards
    Santhosh Jose

    Hello

    on your detail page (2nd report) create a hidden page element called P2_EMPID
    Now change the query on this page to use this page element in the where clause (such as a variable binding).
    for example:

    Select * from EMP
    where empid =: P2_EMPID

    On your first page, you need to set a link to the column for the chosen, employed at the point P2_EMP on the second page. This can easily be done via a column binding in the report on the first page (have it redirect to a page in the apex and set the page to the second page of the report, and also set the P2_EMPID value to the value of #EMPID #, correcting the names of these variables can be chosen in the selection lists when you set the link in the column).

    concerning
    Bottom

  • Passing values from one page to the other

    Hello

    I have two code coldfusion pages, a page how to display the form and another is the action of the form code. I want to create another page, so that if the user hits the edit button, it is taken to a page where the user of the same form with entries filled beforehand for some areas and the remaining fields are uneditable, i.e. they give the value in the database for the current entry, as it is.

    Should I access the values of the database, if so, HOW? And if not, HOW?

    Thank you

    vijayvijay77.

    IF you aready accessible data on the previous page, you can store the data in a persistent scope (session, application, server) where it can be reused on other pages without a trip back to the database.

    IF you have not yet accessed the data, then passing a key via a GET (URL alias) or variable POST (aka SHAPE) allows easy access to a query to retrieve the desired data from the database to fill in the form.

    The use cases have good discussion with examples in the ColdFusion Developer Guide.

    http://livedocs.Adobe.com/ColdFusion/8/htmldocs/Part_4_CF_DevGuide_1.html

  • passing values from one page to bring up the window page apex

    Hi all

    I created the java script to open a new window to send mail from apex.

    < script language = "JavaScript" type = "text/javascript" >

    function send_mails (template_id) {}
    Window.Open ('https://hrssc-in.oraclecorp.com/pls/apex/f?p=154:15: & SESSION.: 15:P15_VENDOR_CODE, P15_MONTH, P15_YEAR, P15_DISCREPANCY_DETAILS_DL, P15_DISCREPANCY_DETAILS_CS, P15_DISCREPANCY_DETAILS_PF, P15_DISCREPANCY_DETAILS_ESI, P15_TEMPLATE_ID: & P2_VENDOR_NAME., P2_MONTH., P2_YEAR., & P2_DISCREPANCY_DETAILS_DL, & P2_DISCREPANCY_DETAILS_CS. & P2_DISCREPANCY_DETAILS_PF. & P2_DISCREPANCY_DETAILS_ESI.) (,'+ category, null, "height = 500, width = 1200, status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes") ;}


    < /script >

    I can change the value of page 2 to the page 15 using the code above that if I choose page submitt for items (action when the changed value of the page).

    If there is another way to transmit values without submitting the items (in the action of the page tab).

    can someone help me solve this problem

    Thanks in advance,

    Year s

    Hello

    the function of $ v that allows you to get the values of the elements cannot be used as part of the parameter to window.open.
    Try to concatenate function calls v$ in the parameter

    
    

    What does the category in the parameter string?

    Kind regards
    Erik-jan

  • How to pass values from one function to the other

    Hello

    I am a school teacher and a beginner in Flash Actionscript. I am creating a countdown for use in my classroom during testing. The beginning and break according to need, but not the pause button functions. When I click on the pause button, the timer is reset to 0:00:00. Help, please. Here is the code that I had written so far:

    var Subject1timeLeftHr;

    var Subject1timeLeftMin;

    var Subject1timeLeftSec;

    Subject1start_btn._visible = true;

    Subject1pause_btn._visible = false;

    Subject1rotor_mc.gotoAndStop (1);

    Subject1rotor_mc._visible = false;

    Subject1durationHr_txt. Text = "0";

    Subject1durationMin_txt. Text = "00";

    Subject1durationSec_txt. Text = "00";

    Selection.setFocus (Subject1durationHr_txt);

    function SubjectdurationHr (SubjectxdurationHr_txt, SubjectxdurationMin_txt)

    {

    if (SubjectxdurationHr_txt.length == 1)

    {

    Selection.setFocus (SubjectxdurationMin_txt);

    }

    }

    function SubjectdurationMin (SubjectxdurationMin_txt, SubjectxdurationSec_txt)

    {

    if (SubjectxdurationMin_txt.length == 2)

    {

    Selection.setFocus (SubjectxdurationSec_txt);

    }

    }

    function SubjectdurationSec (SubjectxdurationSec_txt, SubjectxdurationHr_txt)

    {

    if (SubjectxdurationSec_txt.length == 2)

    {

    Selection.setFocus (SubjectxdurationHr_txt);

    }

    }

    Subject1durationHr_txt. OnChanged = function()

    {

    SubjectdurationHr (Subject1durationHr_txt, Subject1durationMin_txt);

    };

    Subject1durationMin_txt. OnChanged = function()

    {

    SubjectdurationMin (Subject1durationMin_txt, Subject1durationSec_txt);

    };

    Subject1durationSec_txt. OnChanged = function()

    {

    SubjectdurationSec (Subject1durationSec_txt, Subject1durationHr_txt);

    };

    function startcountdown (SubjectxdurationLeft, SubjectxdurationHr, SubjectxdurationHr_txt, SubjectxdurationMin, SubjectxdurationMin_txt, SubjectxdurationSec, SubjectxdurationSec_txt, Subjectxduration, SubjectxstartTime, SubjectxendTime, Subjectxtimer_mc, Subjectxpause_btn, Subjectxstart_btn, Subjectxrotor_mc, SubjectxtimeLeft, SubjectxtimeLeftHr, SubjectxtimeLeftMin, SubjectxtimeLeftSec, SubjectxtimeLeftHr_txt, SubjectxtimeLeftMin_txt, SubjectxtimeLeftSec_txt)

    {

    delete SubjectxdurationLeft;

    delete SubjectxdurationHr;

    delete SubjectxdurationMin;

    delete SubjectxdurationSec;

    delete Subjectxduration;

    delete SubjectxdurationHr_txt.text;

    delete SubjectxdurationMin_txt.text;

    delete SubjectxdurationSec_txt.text;

    SubjectxstartTime = getTimer();

    Subjectxtimer_mc.onEnterFrame = function()

    {

    if (SubjectxdurationHr_txt.text == Nan |) SubjectxdurationMin_txt.text == Nan | SubjectxdurationSec_txt.text is Nan)

    {

    }

    else

    {

    SubjectxdurationHr = 60 * 60 * 1000 * Number (SubjectxdurationHr_txt.text).

    SubjectxdurationMin = 60 * 1000 * Number (SubjectxdurationMin_txt.text).

    SubjectxdurationSec = 1000 * Number (SubjectxdurationSec_txt.text).

    Subjectxduration = SubjectxdurationHr + SubjectxdurationMin + SubjectxdurationSec;

    SubjectxendTime = SubjectxstartTime + Subjectxduration;

    SubjectxdurationLeft = SubjectxendTime - getTimer();

    if (SubjectxdurationLeft > 0)

    {

    SubjectxdurationHr_txt._visible = false;

    SubjectxdurationMin_txt._visible = false;

    SubjectxdurationSec_txt._visible = false;

    Subjectxpause_btn._visible = true;

    Subjectxstart_btn._visible = false;

    Subjectxrotor_mc._visible = true;

    Subjectxrotor_mc.play ();

    SubjectxtimeLeft = SubjectxdurationLeft / (1000 * 60 * 60);

    SubjectxtimeLeftHr = Math.floor (SubjectxtimeLeft);

    SubjectxtimeLeftMin = Math.floor ((SubjectxtimeLeft-SubjectxtimeLeftHr) * 60);

    SubjectxtimeLeftSec = Math.floor (((SubjectxtimeLeft-SubjectxtimeLeftHr) * 60 - SubjectxtimeLeftMin) * 60);

    SubjectxtimeLeftHr_txt.text = String (SubjectxtimeLeftHr);

    if (SubjectxtimeLeftHr_txt.length < 1)

    {

    SubjectxtimeLeftHr_txt.text = '0' + SubjectxtimeLeftHr_txt.text;

    }

    SubjectxtimeLeftMin_txt.text = String (SubjectxtimeLeftMin);

    if (SubjectxtimeLeftMin_txt.length < 2)

    {

    SubjectxtimeLeftMin_txt.text = '0' + SubjectxtimeLeftMin_txt.text;

    }

    SubjectxtimeLeftSec_txt.text = String (SubjectxtimeLeftSec);

    if (SubjectxtimeLeftSec_txt.length < 2)

    {

    SubjectxtimeLeftSec_txt.text = '0' + SubjectxtimeLeftSec_txt.text;

    }

    }

    else

    {

    delete Subjectxtimer_mc.onEnterFrame;

    SubjectxtimeLeftHr_txt.text = "";

    SubjectxtimeLeftMin_txt.text = "";

    SubjectxtimeLeftSec_txt.text = "";

    SubjectxdurationHr_txt._visible = true;

    SubjectxdurationMin_txt._visible = true;

    SubjectxdurationSec_txt._visible = true;

    Subjectxrotor_mc.gotoAndStop (1);

    Subjectxrotor_mc._visible = false;

    SubjectxdurationHr_txt.text = '0 '.

    SubjectxdurationMin_txt.text = "00";

    SubjectxdurationSec_txt.text = "00";

    Subjectxpause_btn._visible = false;

    Subjectxstart_btn._visible = true;

    Selection.setFocus (SubjectxdurationHr_txt);

    }

    }

    };

    }

    function pausecountdown (SubjectxdurationHr_txt, SubjectxtimeLeftHr, SubjectxdurationMin_txt, SubjectxtimeLeftMin, SubjectxdurationSec_txt, SubjectxtimeLeftSec, Subjectxstart_btn, Subjectxpause_btn, Subjectxrotor_mc)

    {

    delete Subjectxtimer_mc.onEnterFrame;

    SubjectxdurationHr_txt.text = String (SubjectxtimeLeftHr);

    SubjectxdurationMin_txt.text = String (SubjectxtimeLeftMin);

    SubjectxdurationSec_txt.text = String (SubjectxtimeLeftSec);

    Subjectxstart_btn._visible = true;

    Subjectxpause_btn._visible = false;

    Subjectxrotor_mc.stop ();

    }

    Subject1pause_btn.onRelease = function()

    {

    pausecountdown (Subject1durationHr_txt, Subject1timeLeftHr, Subject1durationMin_txt, Subject1t, imeLeftMin, Subject1durationSec_txt, Subject1timeLeftSec, Subject1start_btn, Subject1pause_btn, Subject1rotor_mc);

    };

    Subject1start_btn.onRelease = function()

    {

    startcountdown (Subject1durationLeft, Subject1durationHr, Subject1durationHr_txt, Subject1dura, tionMin, Subject1durationMin_txt, Subject1durationSec, Subject1durationSec_txt, Subject1durati, Subject1startTime, Subject1endTime, Subject1timer_mc, Subject1pause_btn, Subject1start_btn, Subject1rotor_mc, Subject1timeLeft, Subject1timeLeftHr, Subject1timeLeftMin, Subject1timeLeftS ec, Subject1timeLeftHr_txt, Subject1timeLeftMin_txt, Subject1timeLeftSec_txt);

    };

    Subject1cancel_btn.onRelease = function()

    {

    Subject1timeLeftHr_txt.text = "";

    Subject1timeLeftMin_txt.text = "";

    Subject1timeLeftSec_txt.text = "";

    Subject1durationHr_txt._visible = true;

    Subject1durationMin_txt._visible = true;

    Subject1durationSec_txt._visible = true;

    Subject1durationHr_txt.text = '0 '.

    Subject1durationMin_txt.text = "00";

    Subject1durationSec_txt.text = "00";

    Subject1timeLeftHr_txt._visible = true;

    Subject1timeLeftMin_txt._visible = true;

    Subject1timeLeftSec_txt._visible = true;

    Subject1pause_btn._visible = false;

    Subject1start_btn._visible = true;

    Subject1rotor_mc._visible = false;

    Subject1rotor_mc.gotoAndStop (1);

    delete Subject1timer_mc.onEnterFrame;

    delete Subject1durationLeft;

    delete Subject1duration;

    delete Subject1durationHr_txt.text;

    delete Subject1durationMin_txt.text;

    delete Subject1durationSec_txt.text;

    };

    I think you need to spend time by reducing your code at a practical level.  You seem to be any passage in the book in each function and I think that probably none of this is necessary.  If you have declared these variables at the beginning, then you don't need to transfer them to any function, because they are gobally available to one of the functions/code that follows.  Similarly, if you have some textfields on stage, it is pointless to pass those in all functions for the same reason.

    I see you doing the overuse of 'delete' (and possibly errant use as well).  Is probably the only thing you might want or need to use...

    delete Subjectxtimer_mc.onEnterFrame;

    Which stops the enterframe trigger activity, which I think is used to update the textfields which indicate the time.

    And that conditional uses == Nan is not likely to do anything except wonder what is a Nan.  TextFields hold the strings, which are cited.  SO unless you have a variable named Nan somewhere that has a value of string assigned to her, this condition will do nothing for you.  You probably don't need it at all if you get this working properly.

  • Pass values from one component to another

    Because the data is used in many different areas, I need my code works like this - in the main application an event is raised, because of a button may be something something else, and when this event is raised, the data is passed to something as a singleton class. Then use regardless of the data items, let's say a textbox, must be updated with the new value. I have to be able to do this, but several times, the event is triggered when the application is running.

    Could someone tell me how to do this, or point me to a resource?

    Thank you.

    EventWithObject should extend event, not TextArea.

    If what you want is to have the text in an update of the text box control, you should just use [Bindable] variables.


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >


            [Bindable] private var myText:String = "Initial".
    ]]>
       

       
           
                   
       

    Here is how I could do this:

    Create a class for your data model, make of it properties bindable.

    Start the Application, create an instance of the data model object.  Pass this instance of all your various components.

    Now if the component A wants to change the text, it can set this property on the object data model.  Component B will update its display automatically as long as everything is set up with [Bindable].

  • Passing values from child to child. Need help

    I'm kinda a noob and I'm having a problem.  I had posted about this before, but I think I explained what I do way too complicated, so I'll try and simplify this a bit.

    I have 5 SWFs.

    -main.swf (parent)

    -child01.swf

    -child02.swf

    -child03.swf

    -child04.swf

    When main.swf is running, it loads child03.swf on the bottom (eventhough levels are not relevant in AS3) child01.swf and child02.swf load on top of child03.swf.

    main.swf has an arrow button, proceed to the next screen.  When you press the arrow button it unloads child01.swf, child02.swf and child03.swf, then load child04.swf.

    Here's my problem... child03.swf contains text boxes dynamic, appointed tf0 - tf14, which get the values passed by functions in each of these files.  I need to pass these same values in the text boxes child04.swf dynamics.

    The thing that worries me is that child01.swf and child02.swf discharged when you press the arrow button.  I guess that the values stored in these text boxes be unloaded as well.  If this is the case, I need to store these values before that happens the unload event, which I do not know how to do.

    Then once I store these values they need to move to dynamic text, named tf15 - tf 29, in child04.swf areas.  I did research and research and can't find a solution.  Some speak using LocalConnection.  kglad tried to point me in the right direction using MovieClip, but I can't seem to make it work.

    I am including the script for the relevant files.

    main.swf

    Stop();

    var Allergy_Tag:URLRequest = new URLRequest("child01.swf");
    var Info_Tag:URLRequest = new URLRequest("child02.swf");
    var Sec_A_B:URLRequest = new URLRequest("child03.swf");
    var Sec_C_D:URLRequest = new URLRequest("child04.swf");

    var AT_Loader:Loader = new Loader();
    var IT_Loader:Loader = new Loader();
    var AB_Loader:Loader = new Loader();
    var CD_Loader:Loader = new Loader();

    AT_Loader.x = 0;
    AT_Loader.y = 85;
    IT_Loader.x = 483;
    IT_Loader.y = 85;
    AB_Loader.x = 0;
    AB_Loader.y = 0;
    CD_Loader.x = 0;
    CD_Loader.y = 0;

    AT_Loader.load (Allergy_Tag);
    IT_Loader.load (Info_Tag);
    AB_Loader.load (Sec_A_B);
    CD_Loader.load (Sec_C_D);

    addChild (AT_Loader);
    addChild (IT_Loader);
    addChild (AB_Loader);

    shares in arrow btn
    arrowBtnMain.buttonMode = true;

    arrowBtnMain.addEventListener (MouseEvent.ROLL_OVER, arrowBtnMainRollOver);
    arrowBtnMain.addEventListener (MouseEvent.CLICK, arrowBtnMainClick);

    function arrowBtnMainRollOver(event:MouseEvent):void {}
    arrowBtnMain.gotoAndPlay (2);

    }

    function arrowBtnMainClick(event:MouseEvent):void {}
    gotoAndStop (2);
    AT_Loader.Unload ();

    IT_Loader.Unload ();
    AB_Loader.Unload ();
    addChild (CD_Loader);
    }

    child03.swf

    Stop();


    changes the size of the text on the boxes
    Import fl.managers.StyleManager;

    var textf:TextFormat = new TextFormat();
    textf. Size = 9;
    StyleManager.setComponentStyle ("textFormat", box, textf);
    StyleManager.setComponentStyle (box to check, "textPadding", 2);


    handles tag labels
    var currentTF:uint = 0;

    function clickCB(evt:MouseEvent): void {}
    This ["tf" + currentTF] .text = .label CheckBox (evt.target);
    currentTF += 1;
    }

    for (var i: uint = 0; i < 30; i ++) {}
    This ["cBox" + i] .addEventListener (MouseEvent.CLICK, clickCB);
    }


    manages the text boxes
    F_NAME.addEventListener (Event.change, copyText);
    L_Name.addEventListener (Event.change, copyText);
    emer_01.addEventListener (Event.change, copyText);
    emer_02.addEventListener (Event.change, copyText);
    emer_03.addEventListener (Event.change, copyText);

    function copyText(e:Event):void
    {
    TF10. Text = f_name.text;
    TF11. Text = l_name.text;
    TF12. Text = emer_01.text;
    TF13. Text = emer_02.text;
    tf14. Text = emer_03.text;
    }

    child04.swf

    Stop();

    Import fl.managers.StyleManager;

    var textf:TextFormat = new TextFormat();
    textf. Size = 12;
    StyleManager.setComponentStyle ("textFormat", box, textf);
    StyleManager.setComponentStyle (box to check, "textPadding", 2);


    manages allergy pearls
    var currentTF:uint = 30;

    function clickCB(evt:MouseEvent): void {}
    This ["tf" + currentTF] .text = .label CheckBox (evt.target);
    currentTF += 1;
    }

    for (var i: uint = 30; I < 60; i ++) {}
    This ["cBox" + i] .addEventListener (MouseEvent.CLICK, clickCB);
    }

    Here is an example of a part of the script I tried to impliment on child04.swf the values of the dynamic text on child03.swf boxes

    tf15.addEventListener (Event.change, importText);

    function importText(e:Event):void
    {
    tf15. Text = MovieClip (AT_Loader.content) .tf0;
    }

    before you unload(), store the values that you need in the variables defined on the main swf file's main timeline.

    If AB_Loader load child03.swf and AB_Loader is in the main timeline, then:

    MovieClip (AB_Loader.content)

    the main scenario for child03.swf reference.  If t0 - t14 is on the main timeline of child03.swf:

    MovieClip (AB_Loader.content).t0.text

    référenceriez the text property of t0.

    so using:

    maintimelineVar0 = MovieClip (AB_Loader.content).t0.text;

    store text of t0.

    and the main scenario for the main swf file:

    MovieClip (CD_Loader.content).t15.text = maintimelineVar0;

    assign t15 child04 (assuming that it is the main scenario for child04) the text that had been child03 t0.

  • Passing values from one page to another page.

    Hello

    I have created two pages in two different applications. There are some similar elements in the two pages. There is a button on page 2. When the button is pressed, it should take me to page 1 with all similar elements with the corresponding values of page 2. I therefore created a branch and gave the url of the branch as a page 1 similar to this "f?" p = 106:1: & SESSION. : & DEBUG.:P1_PRACTICE, P1_CUST_PRODUCTS, P1_CUST_SUBPRODUCTS, P1_MODULES_SOFTWARE, P1_GOLIVE_DATE, P1_RELATED_LINKS: & P2_PRACTICE., P2_CUST_PRODUCTS., P2_CUST_SUBPRODUCTS., & P2_MODULES_SOFTWARE, & P2_GOLIVE_DATE. & P2_RELATED_LINKS. »

    This link works for most of the time, but unfortunately, there is a problem that I'm not able to understand. The P1_PRATICE element is a checkbox. So, when I select two or more values on page 2 and then click on the button that leads me to page 1, the link is like that "f?" p = 106:1:1771393474706829:NO:P1_PRACTICE, P1_CUST_PRODUCTS, P1_CUST_SUBPRODUCTS, P1_MODULES_SOFTWARE, P1_GOLIVE_DATE, P1_RELATED_LINKS:Applications:Technology "
    In this case, I chose 'Application' and 'Technology' in the box, but I don't get the corresponding value loaded into page 1 in the checkbox of the corresponding element.

    Can you help me in this regard. Is there a solution to this problem?

    Thank you
    Vignesh

    In this case, create a new item on page 2 (P2_TEMP). Create a calculation on the page submitted for P2_TEMP. Make a calculation of PL/SQL Expression with:

    Replace(:P2_PRACTICE,':',';')

    .. .to replace the colon with a semicolon. Now you can pass & P2_TEMP. in the branch in P1_PRACICE of the application target. On the home page, create a process of avant-en-tete of P1_PRACTICE with the value:

    : P1_PRACTICE: = replace(:P1_PRACTICE,';',':')

    .. to convert the semicolon in two points.

    Scott

Maybe you are looking for