APEX 4: Dynamic Action to manipulate a search string in the interactive report

Hello

I have the following problem. I have an interactive report that shows a few columns and one of them has a barcode that has been saved as a numeric value for display in the column is something like ("123456789"). All works fine so far. If anyone 123456789 they will get the right line and all is well. Unfortunately if I scan in the barcode with a barcode scanner, he enters '01234567890'. I don't have nor the ability to reprogram the scanner BC and I can't change how the data gets displayed.

So I thought I would create a dynamic action that is triggered when the contents of the textfield object change. So, I've created a dynamic action, selected jQuery and entered .apexir_SEARCH and the Change event.
I then chose to run JavaScript and entered as cod:

var newsearch = document.getElementById ('apexir_SEARCH').value.replace (/ ^ [0] + / g, ");
var inputObj = document.getElementById ("apexir_SEARCH");
If (inputObj)
{
Update of the value
inputObj.value = newsearch;
}

So far so good. When I load the page and enter a value from a '0', it works like a charm and it removes the zero. But if I delete again on the page and the search filter, dynamic action will do nothing. I'm really confused, as if I just made a mistake in the JavaScript code or what is the reason, that the action runs only the first time. I have to reload the page and then it will still be to manipulate the string once, but the second time, it won't.

I'm very happy for any help you can provide!

Thank you
Dennis

Hi Dennis,

The thing that comes to mind is to check that the scope of the event of dynamic action is 'live '. If it's on (default) bind, then when a partial page refresh occurs, action will not fire the first time. Direct fires each time.

Hope this helps

Tags: Database

Similar Questions

  • By using the search field of the interactive report

    Hello

    I want to use the search field of the interactive report to set this value in a page item, use it to pass this value to another feature.

    How can I do this?

    Concerning

    Eve wrote:
    Hello

    I want to use the search field of the interactive report to set this value in a page item, use it to pass this value to another feature.

    How can I do this?

    Concerning

    Create a dynamic action as follows:

    Event: Before updating
    Selection type: Region
    Region:

    Real Action:

    Action: Run the JavaScript Code
    Code: $s ('PX_YOUR_ITEM_NAME', $v ('apexir_SEARCH'));

    Click on create

    When it is created, change the dynamic action and define the scope of the event on the dynamics

  • SEARCH IN THE INTERACTIVE REPORT

    I have two pages. I need, thanks to a button, driving some information for another page. But I need to press information for the search field of the interactive report.
    I think the name is apexir_SEARCH
    How I refer to the search field?
    Help me please...

  • A page element to store the string search say P100_SEARCH_ITEM.
  • Affect this element through the use of IE URL that article redirect to URL to this page
  • Add onload JS code that sets the IR field with the value of the page element.

    $s ('apexir_SEARCH', $v ('P100_SEARCH_ITEM'))

  • In addition, add an event handler to set the page element when the search field is changed too

    $('#apexir_REPORT #apexir_SEARCH').change(function(){
      $s('P100_SEARCH_ITEM',$v('apexir_SEARCH'))
    });
    
  • APEX 5: Dynamic Action do not run on DEMAND Condition = VALUE

    After migration from APEX to APEX 5 dynamic action 4.2.5 which performed in 4.2.5 won't work in 5 APEX.

    Event DA: BEFORE the PAGE is SENT

    Condition: Ask = value

    Value: SAVE

    Page contains the button SAVE, in the debug REQUEST window appears like SAVE, but DA does not occur.

    When the condition is not defined, DA works correctly in the APEX 5.

    Is this a bug in 5 APEX?

    Hey Bozo,

    Bozo says:

    How to have this in mind, can be made to run before Page submit DA specified button click?

    It depends on what you want to achieve a click of button and what you want to achieve with DA.

    The purpose of the button and DA can be combined in a javascript function or in the DA himself.

    How this can be achieved in the DA itself is:

    • Instead of shooting the DA "before submit Page', fire the DA to the click event of button. (to do this change the button action to listen for events from DA)
    • In the first real action, run everything you want to achieve with DA.
    • Write another real action, to submit the page and set the application to any value you want. (ensure that the processes we submit are conditional on the overall application, instead of the State of the button)

    Kind regards

    Kiran

  • Calculations in APEX 4.2 on the interactive report and the update form

    Hello

    I know that people have asked similar questions, but I was not able to do this work. I'm doing some fairly simple math (addition, multiplication) in an application. I have 2 fields (VALUE_A, VALUE_B). I can get the addition and multiplication work in the interactive report, but I also need that it works correctly in the form of update. I also need update form to work dynamically so that if the values are changed, the correction calculated response is shown immediately on the update form and then reflected in the interactive report. I tried the dynamic action, with and without javascript without result. Any help would be appreciated.

    Request Express 4.2.6.00.03

    model application:

    https://Apex.Oracle.com/pls/Apex/f?p=82162:

    username: guest

    password: Peanut123

    Thank you

    Rachel

    ADD dynamic action

    After refresh of region

    Set value

    ELEMENT the VALUE to change

    check the fire on the load

    To source, use expression JavaScript

    If ($v ("P2_TEST_1")! = null & $v ("P2_TEST_2")! = null)

    {

    parseInt ($v ("P2_TEST_1")) + parseInt ($v ("P2_TEST_2"));

    }

    ElseIf ($v ("P2_TEST_1")! = null & $v ("P2_TEST_2") == null)

    {

    parseInt ($v ("P2_TEST_1"));

    }

    ElseIf ($v ("P2_TEST_1") == null & $v ("P2_TEST_2")! = null)

    {

    parseInt ($v ("P2_TEST_2"));

    }

    on the other

    { 0; }

    That add another dynamic action on change POINT P2_TEST_1 and set even with the same expression JavaScrit action. but NOT fire on the load
    Do the same for the ARTICLE P2_TEST_2

    And the same for A times B but change + to *.

    Here, I did samples for you with this code.

    https://apex.Oracle.com/pls/apex/f?p=83519 demo/demo

  • Customize the Action menu in the interactive report

    To change the word 'Action' in the menu of the interactive report.

    Apex 4, we had the 'Image of the Action menu' option, but the Apex 5 this option disappeared.

    This isn't in known issues in the Apex 5!

    Someone knows how to set an image or other text to the menu Action interactive report?

    Anderson.Ferreira wrote:

    To change the word 'Action' in the menu of the interactive report.

    Apex 4, we had the 'Image of the Action menu' option, but the Apex 5 this option disappeared.

    This isn't in known issues in the Apex 5!

    Someone knows how to set an image or other text to the menu Action interactive report?

    Why do you need to change?

    Follow the instructions in 'Translating Messages used internally by Oracle Application Express' to create a custom text for the message of the APEXIR_ACTIONS system. Available for translation/customization internal messages are listed in these tables.

  • Contains no column 5 added to the interactive report apex

    Hi, I added a column in the query to the interactive report region and it does not appear in the designer of the Page, as it is not available when running in the list of columns through the action of the report menu.

    In the 4 apex when the query was changed directly a message was generated with the details of the new or modified columns, but the Apex 5 when I change the query and save, nothing happens.

    How to view the new column?

    Thank you.

    carlosjch wrote:

    Thanks fac586, I already tried to use view of the component, when I modify the query the new column is added, a message appears: area update.   No details of the new column appears in the message.  The result is the same, the column is not available after that.

    What happens if you create another IR with the new query?

  • How to add the action button for each column in the interactive report

    Hi all

    I'm new in APEX, so pls forgive my question, if it's simple, but I am struggling with this problem for days now. I have interactive report and you want to add button in each row. What I want to do with this button is the following:

    1. to execute some stored procedure in need of that particular line item values

    2. returns a (id)

    3. go in another page in the application by passing the value out of the procedure (id).

    and I'm not find the way to do it. I tried now means:

    1. If I add the link of the column, so I can refer to the value of the current row, I don't know how to call the stored procedure and perform actions of rest I need

    2. If I add the button to the region, I do not know how to reference the values in column of a particular line of the interactive report...

    and I'm stuck...

    I just forms and global report and probably still think the "wrong" way .

    Any help would be appreciated!

    Thank you!!!


    user3253917 wrote:

    Please update your forum profile with a real handle instead of 'user3253917 '.

    I request of the company: there is a customer who always orders the same standard product orders (always order the same products, fair amount is different). I want to make it simple for the user: instead of retyping the command (master and few records details every time yet) I want to copy selected command (copy of the master record and record details) so that the user will only change date order (in master record) and amount fields in record details).

    So, in order to give him:

    1. the user must be able to choose the order in which I would copy (at page 4), select it,

    2. I need to make PL/SQL procedure to insert the new master record (order) and a few record details (order_items) (copy of the order/order_items chosen in step 1)

    3. navigate the user to page 29, where the master account at stage 2 insterted appears, so that the user can change the date and quantities.

    Any solution will be highly appreciated! Thank you very much!!!

    In simple terms:

    1. Add a link to column "Command copies" in the report on page 4, which sets the COPY request and passes the order ID on page 29.
    2. On page 29, create a process before header, sequenced to be the first process executed and conditional on REQUEST be EXEMPLARY, which creates a new order as a copy of the order with the ID from page 4 and returns the ID of the new order in the PK command ID of 29 page element.
  • between operator to group by date in the Apex of the interactive reports

    Hello

    In the filter of interactive reports, I could not find the "between" for the date field (got a "group by date" in my (source) sql query.) I wonder, is - this in view of the group by clause date?. Is there a way to show the operator "between" in the interactive reports filter.

    Thank you

    I just opened an existing style IR report, went to the actions, filter, selected a date column and found at the bottom of the list of values... Are you sure of the date that you want to filter on is a real date column?

    Thank you

    Tony Miller
    Webster, TX

    What happens if you were really stalking a paranoid schizophrenic... They would know?

    If you answer this question, please mark the thread as closed and give points where won...

  • Apex 4.0 how use the interactive report filter feature?

    Hi all
    Sorry for the nub question, but if there is a way to create and save 'report' with the filter condition using a function?
    What I want to do is to create an interactive table called TASK report.
    Table has two columns I want to use for filtering:
    FDate - DATE - date
    TDate - DATE - to date
    Then, I need to create multiple saved reports:
    last week the tasks = where FDate between sysdate - 7 AND sysdate...
    last month tasks = where FDate between ADD_MONTH(sysdate,-1) AND sysdate...
    but,
    Interactive report filter does not accept sysdate or calls to functions ADD_MONTH.
    Is there an easy way to configure this feature?
    TIA
    Thomas

    Sorry for the double post...

    Published by: thomaso on August 6, 2010 12:04

    Hi Thomas,

    Take a look at the type of filter 'Row' in the interactive reports filter dialog box. This allows more dynamic filters, such as those involving SYSDATE or ADD_MONTHS calls. See also the next thread for some more details on this:

    Re: Interactive report - line conditional highlighting date function

    It will be useful.

    Anthony.

  • Apex 5 after execution of a dynamic action, want to display message and redirect the page

    Hello Experts,

    I use 5 Apex on XE 11 g.

    One of my page, I have 1 button that performs a dynamic action.

    Right now, I've added two real actions on the key. First of all is PL/SQL code, and the second is on the alert, which shows the success message.

    I want to show the message (box Apex message and not the simple alert message JavaScript box) on successfully executing this dynamic action and post that redirect to another page.


    Can someone help me please in the present.


    Thank you

    Thierry

    Thierry says:

    I use 5 Apex on XE 11 g.

    One of my page, I have 1 button that performs a dynamic action.

    Right now, I've added two real actions on the key. First of all is PL/SQL code, and the second is on the alert, which shows the success message.

    I want to show the message (box Apex message and not the simple alert message JavaScript box) on successfully executing this dynamic action and post that redirect to another page.

    Use the simple way to do this:

    • A button that submits the page rather than perform a dynamic action
    • A process of PL/SQL after presented with the necessary success message page
    • A branch to the landing page with the option include the success process message verified

    General management and the process should be contingent on the button that is clicked.

  • Confirm the dynamic action does not not as expected in the APEX 4.2.5

    This looks like a bug in APEX 4.2.5.  I have a page with a "Cancel" button that redirects to another page.  There is a dynamic action that fires on the button with a confirmation action and the text ' are you sure?  However, if the user selects OK or cancel in the confirmation dialog box makes no difference - the redirect is always performed.

    I found this question after the migration of a page that worked to 4.1.1-to-4.2.5.00.88 APEX and were also able to replicate on apex.oracle.com here:

    https://Apex.Oracle.com/pls/Apex/f?p=19896:2

    (Press the Cancel button in the top right of the page redirects to page 1, regardless of the user's response to confirm the popup.)

    I don't need someone to suggest the alternative code, I know how to build my own confirmation processing.  I want to just raise this as a bug as possible and see if there is a solution to make the dynamic action works as it should.

    NB I found this in the patch notes for 4.2.5.00.88 on a fix for a similar problem:

    http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/Apex-425-patch-set-notes-2186274.html

    15984978

    Dynamic action front-Submit with a confirmation message does not

    Hi Tony,.

    I think the problem is that the action of the button is defined as 'Redirect page in this Application', but it must always be "defined by the dynamic Action" as soon as you have set dynamic actions 'click' to a button. Normally, which is automatically changed as soon as you create your first dynamic action of a button, and I just confirmed by creating a test button in your application that has been defined as «Redirect...» ». After that I created a dynamic action the action of the button is set to "defined by the dynamic Action.

    Is it possible that you have modified the action of the back button to «Reorient...» » ? The question why «redirect...» "does not work, it's that we cannot guarantee in what order the browser will process click on events defined with onclick in the tag button itself and those events attached as a click event handlers. This is why it is necessary that everything is defined as dynamic actions. Only in this case you will be able to cancel the treatment.

    Concerning

    Patrick

    Member of the APEX development team

    My Blog: http://www.inside-oracle-apex.com

    APEX Plug-Ins: http://apex.oracle.com/plugins

    Twitter: http://www.twitter.com/patrickwolf

    Post edited by: Patrick Wolf

  • Link between apex and dynamic action images directory

    Hello

    Recently, I upgraded my version of 4.2.0 for 4.2.2 APEX.

    I missed the step where you have to re - setup the WAR of ADR file to point to the new directory of images. The result is that my dynamic actions would not trigger in the application.

    Although the problem is solved (by the missing step), I am interested to know how dynamic action links to the directory of the specific images of version to make it work?

    See you soon,.

    Xrc xarg wrote:

    Recently, I upgraded my version of 4.2.0 for 4.2.2 APEX.

    I missed the step where you have to re - setup the WAR of ADR file to point to the new directory of images. The result is that my dynamic actions would not trigger in the application.

    Although the problem is solved (by the missing step), I am interested to know how dynamic action links to the directory of the specific images of version to make it work?

    Dynamic Actions are implemented using jQuery and JavaScript, so their operation depends on the good jQuery and JavaScript APEX referenced files when the page is loaded. These files are stored in the "images" folder hierarchy ('Pictures' are an unfortunately close label, legacy for shared components that reside on the web server. 'Assets' or 'resources' would be better words to describe the current content of these files.)

    The references that are in charge of these files are included in the page templates. These are stored in the database and thus updated by the upgrade SQL script. If the files specified by the URL in the page template references are not created in the necessary locations by following the installation steps, the referenced files are not loaded and the dynamic actions generated on the page cannot access the library functions they need to run.

  • Dynamic action to email from automatic calculation of the fields in the form created in the APEX firstname and lastname

    Hello

    I am working in the form based on the employees table. I have email_id (P169_EMAIL_ID), last_name(:P169_LAST_NAME) and 3 fields/items first_name(:P169_FIRST_NAME). I am trying to create a dynamic action Auto Fill the id field of electronic mail with the email ID immediately when the user enters first name and family name, he clicks on the e-mail id field. Please help me with suggestions for the code I should use in dynamic action. For example, if a user enters rakesh in the first name field and choudhury to registered name the by clicking the id field e-mail should automatically show [email protected]

    Thanks in advance!

    Hello

    957450

    You need to change your name to something more appropriate

    I work in the form based on the employees table. I have email_id (P169_EMAIL_ID), last_name(:P169_LAST_NAME) and 3 fields/items first_name(:P169_FIRST_NAME). I am trying to create a dynamic action Auto Fill the id field of electronic mail with the email ID immediately when the user enters first name and family name, he clicks on the e-mail id field. Please help me with suggestions for the code I should use in dynamic action. For example, if a user enters rakesh in the first name field and choudhury to registered name the by clicking the id field e-mail should automatically display [email protected]

    You can use a DA to set the email in the agenda of the Email page when there is a change in the maybe the first name of the person if it follows in the order you presented above.

    E.g.

    Event: change

    Point: P169_LAST_NAME

    Action: Set

    Fires when the event is the result: true

    Parameters

    Set tYpe: PL/SQL body Funtion

    declare
    l_email varchar(40);
    begin
    l_email := :P169_FIRST_NAME||'.'||:P169_LAST_NAME ||'@oracle.com' ;
    return l_email;
    end;
    

    Page items to submit: P169_FIRST_NAME, P169_LAST_NAME

    Items concerned:

    Article: P169_EMAIL_ID

    NB: I recommend that you look at the dynamic Actions of the sample under the application package.

    Hope this helps

    Kind regards

    Benjamin.

  • APEX dynamic action - how to hide an element after the loading of the page

    Hello

    I have a form with the element Type, lesson and page.   I want to create a dynamic as action ' on page load "If Type = x don't then see the lesson and the elements of the page. .

    How can I know if Type = x don't see the lesson and the page. It does not show them.

    Please note the dynamic, action = Page load event

    Thank you

    Try adding

    When the Condition "Javascript expression."

    Value: $v ('P1_TYPE') == 'x')

Maybe you are looking for