Buttons and Dynamic Actions

When triggering a dynamic action from a button, I'd like to prevent the page from submitting. Following the advice from earlier threads, I have set the button to redirect to a URL. But since the dynamic action will be performing all the required actions, I'd like the URL invoked by the button to do nothing.
What is the best practice for allowing the button to do no more than initiate the DA?
Thank you
CS
Edit: Alternatively; instead of triggering the DA using an "onclick" event on the button, can I invoke the DA by naming it as the target URL. That would be the preferred solution I think.
Edited by: ChrisS. on Jul 31, 2011 4:50 AM

Thank you very very much Little Foot.
Coincidentally, I just read earlier today an answer from Anthony Rayner to an unrelated question which mentioned this neat solution in passing. After hours of trawling through W3 schools in vain...
CS
Edit: PS Sorry Little foot, I already marked Tobias's answer as correct, so I could only give you a helpful
Edited by: ChrisS. on 06-Sep-2011 05:49 Edit: PS Sorry Little foot, I already marked Tobias's answer as correct, so I could only give you a helpful

Similar Messages

  • Dynamic actions on button and dynamic column name

    Hi!ynam
    I want to create a dynamic action on button click in my tabular form.
    I have a select list with values of my column names (P7_X_COLUMN) and a text field where users input values for update (P7_X_UVALUE).
    My idea is that when they click the button, they update selected column to desired value in all rows.
    However, I get the following error:
    ORA-06550: line 5, column 5: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored (Go to error)
    It seems to me that I have not referenced the column name correctly, I thought it was the same as referencing values. How do I do that?
    This is my code:
    begin
    update "#OWNER#"."IZV_SLOG_DET"
    set :P7_X_COLUMN=:P7_X_UVALUE;
    end;
    Regards,
    Ivan

    I got it to work, but the query is too big. Can anyone help me with how to get it to work?
    I tried breaking it into more varchar2 strings, but i always get the same error:
    Error processing row.
    ORA-01461: can bind a LONG value only for insert into a LONG column
    declare  
    l_table_name varchar2(30) := 'IZV_SLOG_DET_POM'; 
    l_sql_stmt varchar2(32762);
    begin
    l_sql_stmt := 'update ' || l_table_name || ' set ' || :P7_X_COLUMN || ' =''' || :P7_X_UVALUE|| '''' ||
    'where'||
    'nvl(MSR_PRD_ID,1) = nvl(nvl(''' || :P7_X_MSR_PRD_ID || '''' || ',MSR_PRD_ID),1) and' ||
    'nvl(SRC_STM_ID,1) = nvl(nvl(''' || :P7_X_SRC_STM_ID || '''' || ',SRC_STM_ID),1) and' ||
    'nvl(OZNAKA_KOMITENTA,1) = nvl(nvl(''' || :P7_X_OZNAKA_KOMITENTA || '''' || ',OZNAKA_KOMITENTA),1) and' ||
    'nvl(RSP,1) = nvl(nvl(''' || :P7_X_RSP || '''' || ',RSP),1) and' ||
    'nvl(OZNAKA_RETKA,1) = nvl(nvl(''' || :P7_X_OZNAKA_RETKA || '''' || ',OZNAKA_RETKA),1) and' ||
    'nvl(OZNAKA_IZVJESCA,1) = nvl(nvl(''' || :P7_X_OZNAKA_IZVJESCA || '''' || ',OZNAKA_IZVJESCA),1) and' ||
    'nvl(MBR_KOMITENTA,1) = nvl(nvl(''' || :P7_X_MBR_KOMITENTA || '''' || ',MBR_KOMITENTA),1) and' ||
    'nvl(KOMITENT_NEREZ,1) = nvl(nvl(''' || :P7_X_KOMITENT_NEREZ || '''' || ',KOMITENT_NEREZ),1) and' ||
    'nvl(ZUPANIJA,1) = nvl(nvl(''' || :P7_X_ZUPANIJA || '''' || ',ZUPANIJA),1) and' ||
    'nvl(DRZAVA,1) = nvl(nvl(''' || :P7_X_DRZAVA || '''' || ',DRZAVA),1) and' ||
    'nvl(SEKTOR_NEREZIDENTA,1) = nvl(nvl(''' || :P7_X_SEKTOR_NEREZIDENTA || '''' || ',SEKTOR_NEREZIDENTA),1) and' ||
    'nvl(VRSTA_POVEZANOSTI,1) = nvl(nvl(''' || :P7_X_VRSTA_POVEZANOSTI || '''' || ',VRSTA_POVEZANOSTI),1) and' ||
    'nvl(INSTRUMENT,1) = nvl(nvl(''' || :P7_X_INSTRUMENT || '''' || ',INSTRUMENT),1) and' ||
    'nvl(VALUTA,1) = nvl(nvl(''' || :P7_X_VALUTA || '''' || ',VALUTA),1) and' ||
    'nvl(OTKAZNI_ROK,1) = nvl(nvl(''' || :P7_X_OTKAZNI_ROK || '''' || ',OTKAZNI_ROK),1) and' ||
    'nvl(IZVORNO_DOSPIJECE,1) = nvl(nvl(''' || :P7_X_IZVORNO_DOSPIJECE || '''' || ',IZVORNO_DOSPIJECE),1) and' ||
    'nvl(VRSTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VRSTA_INDEKSACIJE || '''' || ',VRSTA_INDEKSACIJE),1) and' ||
    'nvl(VALUTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VALUTA_INDEKSACIJE || '''' || ',VALUTA_INDEKSACIJE),1) and' ||
    'nvl(PORTFELJ,1) = nvl(nvl(''' || :P7_X_PORTFELJ || '''' || ',PORTFELJ),1) and' ||
    'nvl(UTRZIVOST_KREDITA,1) = nvl(nvl(''' || :P7_X_UTRZIVOST_KREDITA || '''' || ',UTRZIVOST_KREDITA),1) and' ||
    'nvl(ZNACAJKE_KAPITALA,1) = nvl(nvl(''' || :P7_X_ZNACAJKE_KAPITALA || '''' || ',ZNACAJKE_KAPITALA),1) and' ||
    'nvl(RIZICNA_SKUPINA,1) = nvl(nvl(''' || :P7_X_RIZICNA_SKUPINA || '''' || ',RIZICNA_SKUPINA),1) and' ||
    'nvl(UGRADJENI_DERIVAT,1) = nvl(nvl(''' || :P7_X_UGRADJENI_DERIVAT || '''' || ',UGRADJENI_DERIVAT),1) and' ||
    'nvl(ODNOSNA_VARIJABLA,1) = nvl(nvl(''' || :P7_X_ODNOSNA_VARIJABLA || '''' || ',ODNOSNA_VARIJABLA),1) and' ||
    'nvl(PREDZNAK,1) = nvl(nvl(''' || :P7_X_PREDZNAK || '''' || ',PREDZNAK),1) and' ||
    'nvl(VRSTA_IZNOSA,1) = nvl(nvl(''' || :P7_X_VRSTA_IZNOSA || '''' || ',VRSTA_IZNOSA),1) and' ||
    'nvl(KOMITENT_PBR,1) = nvl(nvl(''' || :P7_X_KOMITENT_PBR || '''' || ',KOMITENT_PBR),1) and' ||
    'nvl(UDJELI_POVEZ_C,1) = nvl(nvl(''' || :P7_X_UDJELI_POVEZ_C || '''' || ',UDJELI_POVEZ_C),1) and' ||
    'nvl(AR_ID,1) = nvl(nvl(''' || :P7_X_AR_ID || '''' || ',AR_ID),1) and' ||
    'nvl(AU_ID,1) = nvl(nvl(''' || :P7_X_AU_ID || '''' || ',AU_ID),1) and' ||
    'nvl(AR_BUSS_ID,1) = nvl(nvl(''' || :P7_X_AR_BUSS_ID || '''' || ',AR_BUSS_ID),1) and' ||
    'nvl(MTI_CCY_TP_ID,1) = nvl(nvl(''' || :P7_X_MTI_CCY_TP_ID || '''' || ',MTI_CCY_TP_ID),1) and' ||
    'nvl(REG_NO,1) = nvl(nvl(''' || :P7_X_REG_NO || '''' || ',REG_NO),1) and' ||
    'nvl(REG_SFX,1) = nvl(nvl(''' || :P7_X_REG_SFX || '''' || ',REG_SFX),1) and' ||
    'nvl(JMBG_ID_NO,1) = nvl(nvl(''' || :P7_X_JMBG_ID_NO || '''' || ',JMBG_ID_NO),1) and' ||
    'nvl(IP_ID,1) = nvl(nvl(''' || :P7_X_IP_ID || '''' || ',IP_ID),1) and' ||
    'nvl(TAX_ID_NO,1) = nvl(nvl(''' || :P7_X_TAX_ID_NO || '''' || ',TAX_ID_NO),1) and' ||
    'nvl(INSTRUMENT_OLD,1) = nvl(nvl(''' || :P7_X_INSTRUMENT_OLD || '''' || ',INSTRUMENT_OLD),1) and' ||
    'nvl(PREDZNAK_OLD,1) = nvl(nvl(''' || :P7_X_PREDZNAK_OLD || '''' || ',PREDZNAK_OLD),1) and' ||
    'nvl(NAPOMENA,1) = nvl(nvl(''' || :P7_X_NAPOMENA || '''' || ',NAPOMENA),1) and' ||
    'nvl(NOVI_POSAO_F,1) = nvl(nvl(''' || :P7_X_NOVI_POSAO_F || '''' || ',NOVI_POSAO_F),1) and' ||
    'nvl(LISTA_SUMARNA,1) = nvl(nvl(''' || :P7_X_LISTA_SUMARNA || '''' || ',LISTA_SUMARNA),1) and' ||
    'nvl(LISTA_REKAP,1) = nvl(nvl(''' || :P7_X_LISTA_REKAP || '''' || ',LISTA_REKAP),1) and' ||
    'nvl(DZS_IDY_CL_ID,1) = nvl(nvl(''' || :P7_X_DZS_IDY_CL_ID || '''' || ',DZS_IDY_CL_ID),1) and' ||
    'nvl(HNB_IP_CL_ID,1) = nvl(nvl(''' || :P7_X_HNB_IP_CL_ID || '''' || ',HNB_IP_CL_ID),1) and' ||
    'nvl(NO_DYS_OO,1) = nvl(nvl(''' || :P7_X_NO_DYS_OO || '''' || ',NO_DYS_OO),1) and' ||
    'nvl(POSTOTAK1,1) = nvl(nvl(''' || :P7_X_POSTOTAK1 || '''' || ',POSTOTAK1),1) and' ||
    'nvl(POSTOTAK2,1) = nvl(nvl(''' || :P7_X_POSTOTAK2 || '''' || ',POSTOTAK2),1) and' ||
    'nvl(POSTOTAK3,1) = nvl(nvl(''' || :P7_X_POSTOTAK3 || '''' || ',POSTOTAK3),1) and' ||
    'nvl(BNK_ID,1) = nvl(nvl(''' || :P7_X_BNK_ID || '''' || ',BNK_ID),1) and'||
    'nvl(ID,1) = nvl(nvl(''' || :P7_X_ID || '''' || ',ID),1) and' ||
    'nvl(ID_RETKA,1) = nvl(nvl(''' || :P7_X_ID_RETKA || '''' || ',ID_RETKA),1) and' ||
    'nvl(DATUM_STANJA,1) = nvl(nvl(''' || :P7_X_DATUM_STANJA || '''' || ',DATUM_STANJA),1) and' ||
    'nvl(IZNOS,1) = nvl(nvl(''' || :P7_X_IZNOS || '''' || ',IZNOS),1) and' ||
    'nvl(IZNOS_ACTUAL,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL || '''' || ',IZNOS_ACTUAL),1) and' ||
    'nvl(ACT_AR_BAL_KN,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN || '''' || ',ACT_AR_BAL_KN),1) and' ||
    'nvl(ACT_AR_BAL,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL|| '''' || ',ACT_AR_BAL),1) and' ||
    'nvl(IZNOS_ACTUAL_OLD,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL_OLD || '''' || ',IZNOS_ACTUAL_OLD),1) and' ||
    'nvl(ACT_AR_BAL_KN_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN_OLD || '''' || ',ACT_AR_BAL_KN_OLD),1) and' ||
    'nvl(ACT_AR_BAL_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_OLD || '''' || ',ACT_AR_BAL_OLD),1) and' ||
    'nvl(EXG_RT_CRD_RSK_F,1) = nvl(nvl(''' || :P7_X_EXG_RT_CRD_RSK_F || '''' || ',EXG_RT_CRD_RSK_F),1) ';
    execute immediate l_sql_stmt; 
    end;

  • Session Timeout and Dynamic Actions

    Did anybody ever use the Session Timeout feature in APEX successfully?
    I have set an idle session timeout and provided an url to redirect to once the session is expired: Home > Application Builder > Application nnn > Shared Components > Edit Security Attributes > Session Timeout
    It works so far during the page rendering and page processing phase. But I have major problems with dynamic actions and custom ajax requests.
    Dynamic actions will just hang and simply don't return. Even worse, when I execute the dynamic action once the session is expired, the session seems to be physically deleted and thus the next click on a tab will not redirect to the expiration page but go straight to the login page.
    Did anybody make it work or is the best way to implement a custom session timeout?
    Thanks,
    Dietmar.

    Hi All,
    Check out the Session Timeout plug-in available here:
    http://skillbuilders.com/plugins
    Let me know if that helps.
    Regards,
    Dan
    blog: http://DanielMcghan.us/
    work: http://SkillBuilders.com/APEX/

  • How can a classic report be filtered using one select item and dynamic action?

    APEX 4.2.1
    DB 11g
    I have a page with 4 reports on it.  The top report is an interactive report and the following 3 are classic reports.  The users would like to be able to use a select list to filter the 3rd report by PO line number without refreshing the entire page.
    After verifying that the report is set to allow partial refreshes, I took the following steps
    1.  Created a PO Line select item (p_po_line_select) in the same report region
    2.  Added p_po_line_select to the report query
    3.  Created a dynamic action on p_po_line_select with 2 true actions
         1.  Set value (p_po_line_select)
         2.  Refresh report region.
    The Set Value dynamic step was not working; I would get an out of memory error at line 2, memory stack error, or the value did not get saved to session state depending on the settings I selected.  I was able to get it working with the following set:
    1.  Action = Set Value
    2.  Set type = PL/SQL Expression
    3.  PL/SQL Expression = :p_field_does_not_exist
    4.   Page items to submit = blank
    5.  Selection Type = Item(s)
    6.  Item(s) = p_field_does_not_exist
    p_field_does_not_exist does not exist as a page or application item which leads me to believe that this is a bug and I am just lucky that it worked.  I would rather know how to do this properly.  Can someone please provide a link to a working example of how this should be done or state which settings are wrong?
    I was able to reproduce the issue in the following app
    http://apex.oracle.com/pls/apex/f?p=4500:1000
    workspace = occam
    user  test/apex1
    Thanks,

    STOP POSTING DUPLICATE THREADS.
    If you have additional information, continue the discussion by posting it as a follow-up on the original thread: What is the proper way to filter classic report using just an LOV select field with dynamic action?

  • IT0009: payment method "cheque" and dynamic actions

    Hello,
    I need your help on this issue.
    I have looking for answers on the different posts but i didn't found any similar problems.
    For a customer, i have to settle, in case of departure (leaving) action , the creation in background of an infotype 0009 from infotype 0000 with payment method 'C' - Cheque and the BEGDA equal to the first day of the month. It is a payroll need.
    The dynamics action is easy to do but i have an error which makes appears the infotype. Actually, the information City is mandatory in SAP standard (?) in case of payment 'C' - Cheque.
    I did the test and when i create infotype 0009, the name of the person, from infotype 0002 i guess, is put in the field but not the adress, city and postal code. If i select payment cheque, an errror alerts me that the city is mandatory for this payment method. If i put something, no problem, but i would like to automate it and retrieve data from IT0006. That is strange is when i delete the payee information (last and first name field) and validate the screen, no more error, even if i select payment cheque. And if i save and go back on the record, data from IT0006 (city, postal code and payee) have been automatically put in the infotype.
    I would like to reproduce the same thing by the dynamic action but i can't access these fields because they are not part of the P0009 table but the Q0009 structure and i don't access it through dynamic action
    Do you have some experiences to share on this topic ?
    Thanks in advance.

    hi
    To replace a check or to create a check instead of a bank transfer, the system must be able to access the
    correct payment method. The standard system contains predefined payment methods. However, you can
    also specify your own values.
    The standard system contains the following methods of payment:
    - C (Check)
    - D (Transfer)
    - M (Check with manual assignment of check number)
    Reward points

  • 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

  • HR_INFOTYPE_OPERATION and Dynamic Actions

    Does HR_INFOTYPE_OPERATION trigger Dynamic Action?
    If not, how this needs to be handled?

    your best bet would be the person who created the dynamic action.. usually the functional analyst.. you can take a look at the entries in v_t588z via SM30/31.Once you display the entires, an F1 on each field on the screen will tell you what it is for & F4 will give you the possible options..
    ~Suresh

  • Hi there... I need a little help with buttons and their actions using flex builder 4.5

    I run a repo company and have zero experience in the developing applications and I could use some help from anybody that is willing to give it.... Here is a basic idea of what I need...  let's say there are 3 states... state 1 has a question that says "car you read this?" and a "yes" and a "no" button... when you select either answer, you go to slide 2.  Slide 2 with have a question like "Is the sky brown?" and a "yes" and a "no" button and when either button is selected, you are taken to Slide 3.  Slide 3 needs to be some sort of a text form that is created by the user selecting the buttons and the screen would say something like "yes, i can read this.  no, the sky is not brown", or "no, I can't read this.   yes, the sky is brown" .  I know how to get the buttons to take the user to the correct new slide, but I do not know how to get the buttons to insert specific text somewhere else when any button is selected.... Can anybody help me?  Youtube is only getting me so far, and my kids are driving me nuts while I'm trying to figure this monster out...  I've gotten several slides created and some screens have several buttons, I just need to see what I need to put in the code to get it to do this type of function 

    Also where can I read up on setting my .Xdefaults and xmonad.hs file? I ripped someones from this forum, and it works nice, but I want to make my onw, but cant find any decent documentation. Thanks.
    At the moment, the best source for configs are those posted in the screenshots thread (for both Xdefaults and xmonad.hs), the xmonad config archive (and the available docs from the root page on that site), and our own thread.  Unfortunately you'll have to sort of scrounge for good docs on the xmonad.hs at the moment, since most of the information was written for the 0.4 version of xmonad.  The configuration has since been made MUCH simpler.
    Hope that helps some.

  • Submit button and corresponding action

    I know that when I insert a Submit button I need to go to the
    property inspector and point to an action file so it can receive
    the data and redirect the visitor to a confirmation page, but I
    have no idea how to make that file. Is there a template for
    something like that?

    does your hosting have a pre-installed form->email script?
    Check their
    FAQ/support pages or any hosting control panel the site may
    have.
    if not- what server side scripting can be used on this
    hosting? asp/php/??
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Radio button affecting dynamic action

    Hi
    I am trying to implement Radio Button in apex 4.1.1 , on selecting radio button , it show and hide regions. I got that working
    I was wonder if , i include more static value to radio groups and which are only shown , when authenticated user is logged in or is not a public user and then on selecting same non public radio button it show authenticated region only.
    All in same radio groups
    radio 1 show this to public user
    radio 2 (shown on logged in) when selected show this region.
    thanks in advance

    Hi,
    >
    I am trying to implement Radio Button in apex 4.1.1 , on selecting radio button , it show and hide regions. I got that working
    I was wonder if , i include more static value to radio groups and which are only shown , when authenticated user is logged in or is not a public user and then on selecting same non public radio button it show authenticated region only.
    All in same radio groups
    radio 1 show this to public user
    radio 2 (shown on logged in) when selected show this region.
    >
    Radio buttons are complex HTNL elements. While it is theoretically possible to manipulate then with JavaScripts it is simpler and better to have 2 separate items and hide/show them conditionally.
    If you must use one group then you will need to use jQuery selectors to get hold of the buttons individually. Look up the element in HTML DOM using browser "inspection" utilities, e.g. FF+Firebug, and you can work out the selector.
    Cheers,

  • Several buttons and dynamic(?) EventListener

    Hi everyone,
    I place 10 buttons on my stage, name it "b1", "b2", "b3",.. , "b10".
    All these buttons should use the same function.
    Is it possible to do it dynamically?
    var a: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    for (var i = 0; i < a.length; i++) {
    button = "b" + a[i];
      this[button].addEventListener(MouseEvent.CLICK, onClick_b);
      function onClick_b(pEvt: Event): void {
      my_mc.play();
    Only the button "b10" plays the function.
    Anyone an idea how to let all the other buttons play this function?
    Thank you! C.

    Thank you for your answers, this solution works, but I need an array in my project...
    Now my buttons are called "bone", "btwo", "three".
    var button: String;
    button = "b";
    var a: Array = ["one","two","three"];
    for (var i = 0; i < a.length; i++) {
        button = "b" + a[i];
         button.addEventListener(MouseEvent.CLICK, onClick_b);
    function onClick_b(pEvt: Event): void {
        my_mc.play();
    But it doesn't work...

  • Futureproof and dynamically created button

    I have been looking solution how to make buttons dynamically so that I can fetch dynamically values for buttons:
    - value,onclick,class,type,request
    This excellent page has very closely what I am looking: http://www.laureston.ca/2012/04/20/simple-workflow-implementation-in-apex/
    but I have challenges getting the escaped special characters to work especially for the apex.submit - part.
    Maybe that is just because 'copy-pasting' the plsql-region code from www-page didn't work out of the box
    Application Express 4.2.3.00.08
    Because dealing with the escape chars make the page easily break and there are now the new dynamic actions, I need to check what would be futureproof way of dynamically creating the buttons.
    If this is anyway the most practical way to proceed, then where I should look for further information about htp.p(....) button creation examples with rich escapes?
    Made small test page, where you can see one of my trials trying to get the escapes right.
    user test
    pass test
    http://apex.oracle.com/pls/apex/f?p=1403:2
    rgrds paavo
    --below the code for dynamic plsql region -- very likely the escape chars are not copypasted and shown correctly:
    DECLARE
    --PL/SQL Dynamic Region
    --thisworks too??
      v_showme varchar2(3000);
    BEGIN
      for c in (select sysdate||'asdasd;asdasas'  as button_label
                , 'PIMREQUEST'  as button_request
                , 'button-gray' as button_class
                , 'button'      as button_type
                , 'P38_XPIMPOM' as button_setme
                , 'JUUSTOA'     as button_setme_value
                from dual) loop
    htp.p('<button value='''||c.button_label||''' onclick=\"apex.submit('''||c.button_request||''');'' class='''||c.button_class||''' type='''||c.button_type||'''>
    <span>'||c.button_label||'</span>
    </button>');
      end loop;
    END;

    Hi Paavo,
    Your right about the button_id. It's value comes from an input parameter. The button won't show up in the "When button pressed"-list_of_values. This is not only because you write the id yourself, but more because the entire button is created on the fly. The button isn't stored internal in an apex table, that's why it won't show up in a list of values.
    If you want to trigger a dynamic action with the button, you can use a jQuery selector as triggering element. Here you can refer to the button_id using the '#' as jQuery marker for ID, e.g. '#myButton'.
    What the button that you render does, depends on what you put in the p_link parameter. A normal save button would submit the page with condition 'SAVE', you can do that by setting p_link to 'apex.submit("SAVE")'. If the button should do a page redirect, you set p_link to 'http://www.page2go.com', or whatever url you wish to redirect to.
    The text you put in the button attributes is added as HTML element definition, so if you set p_attrs to 'alt="alternate text"', that will be added to the html of your button.
    An example for a conditional button call could be:
          if p_order_id is null
          then
            create_button
              ( p_id        => 'newOrder'
              , p_link    => 'javascript:apex.submit("CREATE"');'
              , p_label     => 'New Order'
              , p_css       => 'customButton'
          else
            create_button
              ( p_id        => 'updateOrder'
              , p_link    => 'javascript:apex.submit("SAVE"');'
              , p_label     => 'Update Order'
              , p_css       => 'customButton'
          end if;     
    This would create a 'CREATE' button for a new order (p_order_id is null), or a 'SAVE' button for an existing order.
    Regarding your ps: if you mean can you conditionaly create a button using dynamic actions? Then the answer would be yes. Yes you can use the create_button procedure in a dynamic action, however by writing it as stored procedure in the database, or in a database package, you can easily reuse your code and still have only one version of your procedure that you need to maintain.
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Duplicating Buttons and Actions?

    I am creating an Interactive PDF and will be using buttons to show and hide many of the features. I would like to replicate many of the buttons and the actions. However, when I try and copy and paste (or use option) to do this actions attached to the button would not export to the PDF. Is there anything I can do to fix this or accomplish the same thing?

    If a button is not working correctly, here are the typical culprits.
    1. PDF viewer. Interactive elements may not work on various PDF viewers, but in your case, you're using Reader. 
    2. Corruption. An Indesign document (especially one with with many interactive elements) can become corrupt. Export to IDML, open IDML back into ID, export to PDF and test.
    3. Faulty Inspection. A button can be a complex interaction of actions, events and visibility. A button can have multiple actions assigned to multiple events. The complexity is compounded with many buttons using show/hide actions. The task of determining whether all attributes are applied correctly is tedious. Make sure to toggle each event in panel and inspect each action, along with checking the visibility of other buttons.

  • Raise Application Error on Dynamic Action

    Hi
    I am using Apex 4.2. On a click of button a Dynamic Action is written, which calls a DB Package. The DB package has exception handlers and also the package has two output parameters
    Error Code and Error Msg
    So in my code(Dynamic Code) i make a call to the package and checks the value for Erroc Code.
    Begin
    Package call......
      If v_error_code <> '0' Then
        Raise SC_Error;
      End if;
    Exception
      When SC_Error Then
        RAise_Application_error(v_err_code, v_err_msg);
    End;
    But when i run the page and I click I get an Internal exception error
    Output from Debug -- I am not sure what the Cell in Red colour means, because the package is returning a correct message (before the red line).Can anyone help please??
    Thanks
    JS
    ......message: AJAX call returned server error ORA-20003: Customer has already been matched for Execute PL/SQL Code.
    4
    ......is_internal_error: true
    4
    ......apex_error_code: APEX.AJAX_SERVER_ERROR
    4
    ......ora_sqlcode: -20003
    4
    ......ora_sqlerrm: ORA-20003: Customer has already been matched
    4
    ......error_backtrace: ORA-06512: at line 41 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 973 ORA-06512: at "SYS.WWV_DBMS_SQL", line 999 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 830 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN_UTIL", line 2304 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_ACTION_NATIVE", line 442
    4
    ......component.type: APEX_APPLICATION_PAGE_DA_ACTS
    4
    ......component.id: 23185203797756209
    4
    ......component.name: NATIVE_EXECUTE_PLSQL_CODE
    4
    ...Execute Error Handling Callout defined on Page or Application Level
    4
    ...Execute Statement: begin declare l_error wwv_flow_error_api.t_error; begin l_error := wwv_flow_error_api.g_error; wwv_flow_error_api.g_error_result := apx_error_utils.handleerror ( p_error => l_error ); end; end;
    4
    ......Values changed by callout:
    4
    .........message: An unexpected internal application error has occurred. Please get in contact with your system administrator and provide reference# for further investigation.
    4
    .........display_location: ON_ERROR_PAGE
    4
    Stop APEX Engine detected
    4
    Final commit
    4
    1 - 59

    Edit: Well, Patrick beat me to the punch because I was taking my jolly time writing this down
    Well, if you look below the part you put in red, you can see that a callout is made: ...Execute Error Handling Callout defined on Page or Application Level
    With directly below that:
    ......Values changed by callout:
    4
    .........message: An unexpected internal application error has occurred. Please get in contact with your system administrator and provide reference# for further investigation.
    Since the plsql call is on the serverside, this error is trapped within the error handling function aswell. Your error has simply been obscured by it, and probably because it looks at the error backtrace and determines the error is internal.
    Looking at the sample error handling code, this is probably where it goes "wrong":
    -- If it's an internal error raised by APEX, like an invalid statement or
      -- code which cannot be executed, the error text might contain security sensitive
      -- information. To avoid this security problem rewrite the error to
      -- a generic error message and log the original error message for further
      -- investigation by the help desk.
      if p_error.is_internal_error then
    I recreated the situation here, and put some debug in the error handling function just so I could see what sort of error is being processed:
        apex_debug.message('error code: '||p_error.apex_error_code);
        apex_debug.message('sql code: '||p_error.ora_sqlcode);
        apex_debug.message('sql errm: '||p_error.ora_sqlerrm);
        apex_debug.message('error_backtrace: '||p_error.error_backtrace);
    0.05750
    0.00007
    ...Error data:
    4
    0.05757
    0.00006
    ......message: AJAX call returned server error ORA-20099: raise application error for Execute PL/SQL Code.
    4
    0.05763
    0.00006
    ......is_internal_error: true
    4
    0.05769
    0.00005
    ......apex_error_code: APEX.AJAX_SERVER_ERROR
    4
    0.05774
    0.00005
    ......ora_sqlcode: -20099
    4
    0.05779
    0.00006
    ......ora_sqlerrm: ORA-20099: raise application error
    4
    0.05785
    0.00005
    ......error_backtrace: ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 1064 ORA-06512: at "SYS.WWV_DBMS_SQL", line 1090 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 832 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN_UTIL", line 2304 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_ACTION_NATIVE", line 442
    As you can see, the ajax error is an internal error, and that is why it is handled as such in the error handler. With this info you should be able to adjust your handling function. Test for the error code (APEX.AJAX_SERVER_ERROR) and then throw the error message or test for the -20000 range of custom errors for example.
        if p_error.is_internal_error then    
            -- Access Denied errors raised by application or page authorization should
            -- still show up with the original error message
            -- do not parse ajax server errors here !
            if    p_error.apex_error_code <> 'APEX.AUTHORIZATION.ACCESS_DENIED'
              and p_error.apex_error_code not like 'APEX.SESSION_STATE.%'
              and p_error.apex_error_code != 'APEX.AJAX_SERVER_ERROR'
            then
    It probably does need some more work but you should get the gist of it.

  • Screen Personas: Create or control button visibility dynamically

    Hi,
    In Screen Personas, would it be possible to do the following with use of scripting functionality,
    1. Dynamically create controls e.g. buttons and assign actions to them
    2. Control Field Visibility( for GUI fields or Persona fields) at runtime
    Regards,
    Jeron

    Hi Tobias,
    Thanks for clarifying. We are currently evaluating Screen Personas for use in SAP DMS.
    Scenario we are trying to simplify is the workflow process in DMS. A DIR(Document) in DMS, has a status field with various values such as
    1. Initial Draft
    2. Submit for Approval
    3. Approved
    4. Rejected
    5. Archive
    6. Retire etc...
    Users, have to pick right status values from an F4 pop-up to pass document along the business process. This is not very intuitive and we would like to provide buttons on screen corresponding to each valid status that can be selected at that point in time. When a button is selected say, "Approve" or "Reject" the corresponding status value should be filled up in the standard status(hidden) field.
    We have numerous doc types and too many status values. Hence, the static approach of defining buttons in Personas does not scale up and is not support friendly.
    I hope i have been able to explain the scenario correctly. If required, i am open to having a call and can elaborate this in detail.
    Regards,
    Jeron

Maybe you are looking for

  • Profit Center Report - GLPCA

    Dear Experts, I want to include Production and Sales Quantities in Profit Center Report but i am not able to do so because this data is placed in Table : GLPCA and i am only able to use Table : GLPCT in Report Painter. Please guide me how to solve my

  • How to specify a radio button as disabled in Net-UI

    How do i specify a radio button to be disabled using the net-ui ?? i know i can do it in HTML using <INPUT TYPE="RADIO" NAME="btn1" VALUE="today" DISABLED> So what is the Net-UI equivalent to the same ? I could not find much information in the worksh

  • How to create dynamic source file path for lumira?

    i have source file for lumira  visualization on  D:\lumira\SourceFiles\sample.xlsx; also .lums file in D:\lumira\demo.lums But when i use the same Lumira folder in different system i have to again create connection for the datasource for fetching the

  • Lightning to usb camera adapter saying attachment uses too much power

    Can anybody help me please as I brought this cable and I get a message saying accessory unavailable or attachment uses too much power . Thanks in advance

  • Fax report

    How do I set my printer to get a Fax report. Also to get a notice that I have sent the fax