Dynamic action on File browse change event

Hi Experts,
apex version 4.1
This is what i'm trying to do..
i have a file browse control and a text field. when user selects a file, selected fiel's name (without file type extension) should be set to text field.
I tried adding a dynamic action to file browse control's change event and within pl/sql Set Value logic i queried the wwv_flow_files and tried to return the file name it didn't work. i got no data found error. i assumed file is being inserted into wwv_flow_files when a page submission happens.
In my second approach within the SetValue pl/sql logic i got the file browser control's (by directly accessing field, not by querying wwv_flow_files)value and did some string manipulation and tried to return only the file name. yet i got the same no data found error.
Any idea how can i implement this ?
Thanks in advance.
- kurubaran

Hi,
I think PL/SQL approach will not work before you submit data to database.
Have you think use $v function to get value from file browser?
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#BGBGDGIH
Regards,
Jari
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai

Similar Messages

  • Dynamic action on text box change does not working

    i have a page with following components.
    a report that has and edit link.
    a text box to catch the primary key from report link when it is clicked
    a number of elements (text boxes, check boxes and LOVs) which are used as data entry form.
    Now my design is that user enter values save them and no sooner did they save, the report depicts new
    values. if user want to edit any record, they click on edit link and the data entry form elements
    should now bring all those values from DB on page. i m successful to pick primary key and bring
    it in a hidden text box and wrote a dynamic action on its change event that will bring values from
    DB and set all page elements. but but but.........the change event doesnt work. it only work
    when focus is lost from the text box...!! offcourse user wont want to click in that "hiddent" text
    box and then click some where else to bring values in page data entry form......
    help is humbly requested from forum or if any other solution approach is to be used easier than
    one i m using, would be appreciated.
    thanks in advance for reading my bore question :)

    bundles of thanks for reply. i m going to elaborate.
    1. My page no is 3.
    2. Hidden Item name is P3_EDIT_ACTIVITY_ID
    3. Data entry form, hidden item and the report are on the same page.
    4. on the edit link of report, i have used following settings.
        Target: Page in this application
         Page: 3
         and i set hidden item as follows......
         Item 1   P3_EDIT_ACTIVITY_ID         Value #ACTIVITY_ID#
       well, when i click the link on report it does bring Activity_Id in the hidden box (which is not yet hidden for debugging purpose)
    Next i wrote Dynamic action which fires on the change event of P3_EDIT_ACTIVITY_ID and run PL/SQL code with in it which is as follows
      declare
      Dept varchar(50);
    begin
       select my_dept into Dept from activity_main ACTIVITY_ID = :P3_EDIT_ACTIVITY_ID;
       :P3_Dept := :Dept;          (i did use :P3_Dept := Dept also but this wont work)
      insert into testdynamic (stamp) values (Dept);  (I did this to check whether correct value is brought from DB, yes it works correctly, correct Dept is being inserted in stamp column)
    end;
      i have created another true action to check when the dynamic action is fired. its very simple alert. and the problem is, it only fires when focus is lost from the P3_EDIT_ACTIVITY_ID. i mean, when u keep changing value inside the text box, nothing happens, when u go outside, the alert is fired and so the pl/sql procedure. but the line
        :P3_Dept := :Dept;       OR      :P3_Dept  := Dept;         arent working which is the actual requirement.
      I m not using set value here as i have to set a lot of values on page not one. further. plz let me get rid of this lost focus thing as i want the form to be populated with correct values related to P3_EDIT_ACTIVITY_ID as the user click on any edit_link in the report.
    Thanks for persistence. i hope i have provided all the details.
    looking forward.

  • Dynamic Action when GB_Job / Postion Change from G1 to G2,or G5,or G6

    Hi All
    Does any body have any idea how can I write Dynamic Action for, when the position is changed from in subgroup G1 to G2, or G5 or G6 for action infotype 0000, i want a prompt should apper mentioning Emploee Benefits need to be changed, when this action occurs.
    Any help will be highly appreciated
    regards
    AJ

    If it is just to prompt the User to change the benfits, you can use the AFTER_INPUT method in the BAdI HRPAD00INFTY.
    ~Suresh

  • Dynamic Action on Item Value Change with AjaxRequest not working

    Hello,
    I have a select list of users called P222_USERS. When a new user is selected, I want to run a Query to find the email for the new user selected and stick it in text field P222_EMAIL.
    I have an On Demand process on the change of P222_USERS that calls a javascript function:
    fetchEmail($('#P222_USERS').val());
    In my header, the function calls an Application Process in an Ajax request:
    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
                             ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
                             ajaxResult = ajaxRequest.get();
    Here is my On Demand PLSQL Process GET_EMAIL:
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    end;
    The email is not getting populated into :P222_EMAIL. I know i'm close, but have already spent a bunch of time with various alternates to the above function/on demand process. Any help is greatly appreciated. I wish the PL/SQL process on the item change worked in this manner instead of going through AJAX.
    Thank you,
    Johnny

    Johnny98 wrote:
    Hello,
    I have a select list of users called P222_USERS. When a new user is selected, I want to run a Query to find the email for the new user selected and stick it in text field P222_EMAIL.
    I have an On Demand process on the change of P222_USERS that calls a javascript function:
    fetchEmail($('#P222_USERS').val());
    In my header, the function calls an Application Process in an Ajax request:
    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
                             ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
                             ajaxResult = ajaxRequest.get();
    Here is my On Demand PLSQL Process GET_EMAIL:
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    end;
    The email is not getting populated into :P222_EMAIL. I know i'm close, but have already spent a bunch of time with various alternates to the above function/on demand process. Any help is greatly appreciated. I wish the PL/SQL process on the item change worked in this manner instead of going through AJAX.
    Thank you,
    JohnnyThe fact is that your application process sets the items value in the session state and not populate the value on client/browser side
    So you need to return the value from on demand process and assign the value in javascript like this
    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
    ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
    ajaxResult = ajaxRequest.get();
    //newly added
    alert(ajaxResult);
    $s('P222_EMAIL',ajaxResult);
    //amend your On Demand PLSQL Process GET_EMAIL like this
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    //newly added
    htp.prn(:P222_EMAIL);
    end;This way the value will be set into session state and client side as well

  • How to change destination table dynamically in configuration file in ssis?

    hello,
            i have a package i am having one data flow task.in data flow task i have one source and one destination.source and destination are different.i have created xml configuration file by configuring source and destination connection
    strings.
    now i want to change destination in the same server to different database with out opening the package.i want to directly change in the config file.we can change it by modifying configured value proerty and intial catalogue value.but if the table is not
    existed in the changed database.how we can create it dynamically.

    HI jiri Neoral,
                       thanks for reply,as you said above process by this we can do change only databasename.if in my destination database,the table which i used in package is not existed,can we create it dynamically
    using config file.later changing table name is possible?
    For that you need to have a step in SSIS package prior to data flow task to check if table exists and if not create it
    You can use  execute sql task with query like below
    IF OBJECT_ID('TableName') IS NULL
    CREATE TABLE TableName
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Dynamic action with function works, doesnt refresh textfield

    Hi all,
    experimenting with dynamic actions so I got the following setup:
    I've built a screen with 2 text boxes
    P7_input
    P7_output
    The goal is to put some tet in P7 input and have it returned with additional text in P7_OUTPUT
    CREATE OR REPLACE PROCEDURE PRC_ECHO
      P_INPUT IN VARCHAR2  DEFAULT 'LEEG'
    , P_OUTPUT OUT VARCHAR2 
    ) AS
    BEGIN
      p_output := 'Ingevoerd: ' || p_input;
    END PRC_ECHO;I've created a dynamic action on the LOSE FOCUS event of item P7_INPUT.
    The true action executes PL/SQL (sequence number 10)
    Begin
    eigen_apps.uga_prc_echo (:p7_input, :P7_OUTPUT);
    end;"Page items to submit" are set to P7_INPUT, P7_OUTPUT
    (and I tried with just P7_INPUT).
    The second true action (sequence number 20) does a REFRESH on ITEM P7_OUTPUT (and I tried refresh region and other things I thought would make it work.)
    When I enter something in P7_INPUT and tab, click or enter away from the P7_INPUT field, nothing changes in my P7_OUTPUT textfield.
    Only when I hit the refresh button in my browser P7_OUTPUT is filled with 'Ingevoerd: <P7_INPUT value>.
    So. The procedure does return the value into P7_OUTPUT, but I cant get an instant refresh of the P7_OUTPUT to work.
    Can any of you help me?
    Robin

    Getting some other errors now, will look into this tomorrow.
    1 error has occurred
    ORA-06550: line 4, column 18: PLS-00382: expression is of wrong type ORA-06550: line 4, column 7: PL/SQL: Statement ignoredNeed to check my procedure...
    Robin

  • Dynamic actions and tabular forms

    I'm trying to attach a dynamic action to a tabular form item, and it's not working the way I'm expecting it to. Since you can't attach dynamic actions to parts of a tabular form in the "normal" way that you can for page items, I'm using JQuery selectors to pick the parts to link to. For links (such as opening a pop-up window with more information about a row), this is working fine. But I'm really struggling to attach to a simple checkbox.
    On my tabular form, I've got a simple checkbox. I've tried putting text in the Element Attributes, Element Option Attributes, CSS Class, CSS Style, and HTML Expression fields, but none of them appear to be making it through to the source code of the generated page. Which means, I think, that I'm limited to using a jQuery Selector along the lines of "input[name=f07]", but creating a dynamic action on click or on change with that selector doesn't seem to ever fire.
    What am I missing?
    -David

    Ok, this is interesting. When I tried to mock this up on apex.oracle.com, I was able to make it work (though I had to change the selector to "input[name=f07_NOSUBMIT]", which means I'm going to have to walk the DOM to get the actual value...but I'm pretty sure I can handle that). After a bit of scratching my head, I eventually found that my pop-up dynamic action was somehow or other blocking the checkbox dynamic action from firing. Changing the sequence so that the checkbox DA happens first allows them both to fire.
    Here's the javascript from the pop-up DA (it's based on this post by Havard Kristiansen):
    /* prevent default behavior on click */
    var trgt = this.triggeringElement.href;
    var e = this.browserEvent;
    e.preventDefault();
    /* Trigger JQuery UI dialog */
    var horizontalPadding = 30;
    var verticalPadding = 30;
    $('<iframe id="modalDialog" src="' + trgt + '" />').dialog({
         title: "Item Details",
         autoOpen: true,
         width: 570,
         height: 400,
         modal: true,
         close: function(event, ui) {$(this).remove();},
         overlay: {
              opacity: 0.5,
              background: "black"}
    }).width(570 - horizontalPadding).height(400 - verticalPadding);
    return false;At this point, the checkbox DA's action is simply an alert box. Like I said, I'm not sure what's going on, but I'm at least able to move forward...
    -David

  • Dynamic action - show/hide region based on LOV which returns ID

    Hi folks,
    this should be simple, so someone who works with dynamic actions.
    I have a LOV which is based on below query:
    select OBJECT_ID, KOD
      from x_data x;
    retuns:
       ID          KOD
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
    On my page I have also 1 region called TEST_REGION.
    I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
    By other words, if below query returns any record, then SHOW, else HIDE:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
    Thanks,
    Tomas

    Hi,
    One way:
    Create advanced dynamic action.
    Name : Hide region
    Event : Change
    Selection Type : Item(s)
    Items(s) : P200_KOD
    Condition : JavaScript Expression
    Value :
    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
    Fire On Page Load : True
    Hide all page items on the same line : No
    False Action : Show
    Fire On Page Load : True
    Show all page items on the same line : No
    Selection Type : Region
    Region : TEST_REGION
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Quick Picks and Dynamic Actions not working

    I have a page item that includes Quick Pick values. This item also includes a dynamic action to update another item when triggered by a change event. The problem is, quick picks do not trigger change events. Has anyone else seen this and come up with a solution? Thanks.

    Hi,
    the JavaScript code generated for the Quick Picks is using $s which triggers the change event for the target page item.
    I just tried that out and it worked fine for me.
    1) I have defined a text field with a few quick pick values.
    2) Declared a dynamic action which fires on "Change". No condition set
    3) The action is defined as "Alert"
    The alert always shows when I pick a value with a quick pick.
    Can you put an example on apex.oracle.com so that I can have a look.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Set Radio Group Default Value Based on a Select List Change Event

    Apex 4.2
    I have a radio group that is source is below. It returns 3 radio group item All,Miv,Courier
    SELECT type d, code r FROM vw_lov_depot
      WHERE svc_name = :P320_DEPOT
      ORDER BY 1
    The radio group is only populated when :P320_DEPOT gets a value, this is a select list.
    I am trying to set the radio group to  default to this value Miv it would use the statement
    SELECT type d, code r FROM vw_lov_depot
      WHERE svc_name = :P320_DEPOT
      and type ='Miv'
      ORDER BY 1
    I have tried creating a dynamic action on Select list change to populate the default value of the radio group...no joy I also tried a computation. how can I set this default value on when list changed.
    Thanks
    I have got the default Radio Group Selection working by doing a computation before region on the radio group and calling its select statement and setting the value. But the problem is now I cannot change the radtio group as I do it fire the before region trigger and sets it back to the default value....any help?

    Hi,
    Could you please create example to apex.oracle.com?
    Regards,
    Jari

  • Dynamic Action on "Get Focus" After Closing a Popup Window

    Hi,
    From one of APEX Application Pages I am calling a Popup Window where users can create a new record. In the Popup Window once the record is created and window is closed, I want to refresh the region on the main page to show the record created in the popup window.
    How do I create a dynamic action which will fire when the main APEX window gets the focus (after the popup window is closed). ?
    Any pointers will be greatly appreciated.
    Thanks & Regards,
    Ashish Agarwal
    http://www.asagarwal.com

    Assuming that you have a dynamic action in the parent page which refreshes the region
    <li> Make a note of the event which triggers your dynamic action, lets call this event A.
    <li> Create a JS function in parent page which triggers event A when called.
    For example if your Dynamic Action trigger is a button(id ="P100_REFRESH") press event
    Your JS function could be
    function Trigger_refreshRegion()
      $('#P100_REFRESH').click();
    The way in which you simulate the Dynamic action deoends on the firing event that you have used, so modify it appropriately.
    <li>Now in the pop up page, if you are closing the page in JS using smthing like window.close() or so,
    just call the parent page's refresh JS function there using the
      opener.Trigger_refreshRegion(); //whatever was the name of the function that you created.

  • Issue in execution of Dynamic action on change event

    Hi,
    Greetings.
    I have scenario, where I have one select list (P_CATEGORY) and one shuttle control (P_ROOMS) on page.
    The values of the shuttle list is being populated based on the selected value in select list.
    The left pane of shuttle control's value based on LOV and source of the shuttle item is a plsql function, which returning colon separated value list.
    So that returned values shown in the right pane of shuttle.
    The LOV values are getting being populated using cascading LOV i.e based on the of Select List item. But the Shuttle source values not getting auto refresh and for achieving that I've created a dynamic true action on change event of Select list.
    The dynamic action is with :
    Action : Set Value
    Set Type : PL SQL funciton body
    Page items to submit : P_CATEGORY (this is select list)
    Escape Special Character : Yes
    Suppress Change event : Yes
    Affected Elements -
    Selection type : Item(s)
    Item(s) : P_ROOMS
    This is perfectly working on Firefox but not working on IE9 & Google Chrome.
    I've debugged in both IE9 & Google chrome and found the dynamic action get executes ajax call and the values get back but not rendering on the screen. i.e not assigning to the item.
    So can you please advice me what will be a workaround for this issue?
    I am using Application Express 4.1.0.00.32 .
    I'll appreciate your prompt response.
    Thanks & Regards,
    Jaydipsinh Raulji

    I don't understand why this is not working withouth seeing an example, there might be multiple processes working on the item.
    Anyway if the value is returned check if the value is in the session aswell. If it is in the session but not on the page that means you will need to find a way to bring it from the DB to the page. You can do this by adding an action to your DA:
    Action: Execute PL/SQL code
    PL/SQL code: NULL;
    Page Items to Return: your shuttle item

  • Dynamic Action, validation check, on an Item, could not use Change event

    I am learning how to use Dynamic Actions in a 3.2.x app that was upgraded to 4.0.x. I wanted to share what I learned adding client side validation with these actions. Perhaps an Apex guru could suggest an easier method to use this feature.
    I have an existing function where a user selects multiple rows in a report page, and then assigns a single status and enters justification text for the selected rows in another page, then saves changes (via submit).
    One item, justification, is required. I replaced my JavaScript validation of an empty value, e.g., P10_JUSTIFICATION.value, with a dynamic action. The Change event was a candidate for this item, with the "is not null" Condition. However, it is possible to initiate this screen to review the status, overlook the justification text and immediately select a button to save changes. No Change event has fired. The Before Page Submit event was applicable here. This Event selection in the wizard does not provide the Item for definition and then the Condition wasn't the right context though available for selection. I selected JavaScript expression for the Condition, actually entered my original JS test expression, and created one True Action. The True action displays an Alert to tell the user that required text is missing.
    Test of this DA was not completely successful. The alert appeared but the page went on to submit anyway. I found I had to add another True Action, Cancel Event, to stop the submit. The DA was then successful.
    The Apex site examples, [http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm] , do a great job showing use of Change and Set Value events for Items but a user may not always navigate through items. These features were promoted for developers with no to little knowledge of JavaScript to use Apex for application development. This DA required using/understanding JS anyways.
    My next step is to implement actions on a tabular form that that has required values. It is disconcerting that I have read in the forum that the column value references such as f0x and its row number are required to get it all working (as a DOM or JQuery selector). I have already found that tabular form columns can be re-ordered from v3.2.1 to 4.0.x. I was hoping I could declare dynamic actions or simpler Javascript methods that would not rely on f0x array references.
    Thanks,
    Kelly

    It is disconcerting that I have read in the forum that the column value references such as f0x and its row number are required to get it all working (as a DOM or JQuery selector).Not necessarily. One possibility is to use descendent jQuery selectors to attach the dynamic action event handler by column heading:
    td[headers="HIREDATE"] input

  • Dynamic Action on tree change

    Hi,
    Is it possible to trigger a dynamic action from a change in the selection of a tree leaf?
    Using Apex 4.0.1.
    Thanks,
    Chris

    change in the selection of a tree leaf?You meant a different node is clicked , didn't you ?
    If so the D.A would be
    event click
    triggered by : jQuery selector
    selector : div.tree li>a
    if you want to get node id of the clicked element in JS
    you can use
    $('this.triggeringElement).parents('li:first').attr('id');

  • Dynamic Action on change automatically submit

    Hi,
    I have a tabular form (manually handled) with a text item that can be changed (Apex 4.0.2.00.07).
    Each time the user changes the value of the text item, the changes automatically will be submitted.
    Therefore I defined a dynamic action:
    event:onchange
    selection type: region
    with javascriptcode: apex.submit({request:'SAVE'});
    When I leave changed text item with tab-key everything works fine.
    But when I leave changed text item through a button Click only the submit of dynamic action is performed and the button functionality is ignored.
    The button click initiates the onchange event at the changed text item and then ignores everything after this event.
    The enduser will not be able to understand the behavior of the application.
    I have less experience in Java and JavaScript.
    Is it possible to get the information if and which button was clicked, so I can decide at javascriptcode of the dynamic action what is to do?
    Thanks,
    Brigitte

    Region static id shouldn be in bracketsYou missed the '#' informt of the region id.
    why my original PL/SQL process did not work
    FOR i IN 1 .. apex_application.g_f08.COUNTThis works only when the application array has values and that happens only when the page is submitted.When you submit the dynamic action , it isn't.
    This script combined with script to detect changes makes apex page running very slowIf you use that PLSQL code(assuming it works as expected) , then its going to take a server request every-time you change a field in the tabular form and loop though all the array values(if they would be submitted before) and recalculate and compare the checksums . Isn't that going to be very inefficient.
    As for that JS code, it only runs at the client side. You can do all the server side checks on submit, when the user expects some delay due to processing.

Maybe you are looking for

  • Delimited Org Unit(having end date Current date) are not coming in Bex output.

    HI All , I have problem with BEx query output while using the Org. Unit Time dependent Hierarchy structure. In ECC side some of the Org. Unit nodes were delimited or their end date set to less than current date. Now this hierarchy is loaded to BW on

  • External drive doesn't show up.

    I have a LaCie mini hub external drive that I use as a backup drive for my Mac Mini. Well, the drive in the Mini died. I took the LaCie to the Apple store with the Mini and they confirmed that the external drive was working OK, by either USB or Firew

  • Illustrator CS6 on iMac with 2GB RAM

    How will CS6 perform on my iMac with only 2GB RAM?  Minimum requirement is 2GB but I have concern it will be horribly slow.  Does anyone have experience with this?

  • Matrox RT.X2 Review

    I finished my testing of the Matrox RT.X2. The review is online: http://www.stevengotz.com/rtx2.htm You might find the review interesting, you might not. The best thing I can say is that the hardware and software performed flawlessly, as designed. Th

  • TS3989 My iPod flashes then turns off when I try to rotate a picture,what do I do?

    Ok so I want to rotate a picture and press on that little ➡ and it looks like it's turning off but then it flashes and turns on again by itself!how do I fix it?;(