Help with Dynamic Action Construction

I want to create a dynamic action that will disable a field called P1_TBRN when any of the following conditions in the form are true:
:P1_TRIAL_STATUS in ('Off-Trial','Unknown') or
:P1_DIAGNOSIS_MAJOR ='UNKNOWN' or
:P1_INSTITUTION ='Unknown' or
:P1_CONSENT_EXISTS <> 'Y';
I assume I use a "Change" event but I can't work out how to enter the 4 condtions so that they are all checked each time. If I create 4 separate dynamic actions, when I change one of the fields, it does not take into consideration the other field values.
An alternative I've tried is to set up a Read Only condition on P1_TRIAL with the above condition. The only problem is that I have to submit the page each time there is a change in one of the 4 fields above. It would be better if I didn't have to submit the page each time so I'd like to use a Dynamic Action.
thanks in advance
Paul P

Hi Paul.
If you want to evaluate 4 variables in 1 dynamic action you have to post the value of these 4 items on each change of one of these items as far as I know.
I had a form with multiple checks of this kind and ended up having serieus performance issues.
My way around was to evaluate in javascript. You creat a dynamic action on change of any of these 4 fields and set the condition to a javascript expression. The expression looks something like (quick edit so there might be some typos):
$v('P1_TRIAL_STATUS')=='Off-Trial'||
$v('P1_TRIAL_STATUS')=='Unknown')||
$v('P1_DIAGNOSIS_MAJOR')=='UNKNOWN'||
$v('P1_INSTITUTION') =='Unknown'||
$v('P1_CONSENT_EXISTS') == 'Y'
If this evaluates to true the true action of the dynamic action is executed, otherwise the false action.
Cheers
Bas

Similar Messages

  • Set value in tabular form field with dynamic action

    Hi Guys,
    I have a dummy field in a tabular form which I am trying to use to populate another field in the tabular form when it is changed.
    In the tabular form I have an ITEM_ID field. Each item_id has an ITEM_NAME which is the dummy field as it is not a field in the database table.
    When the user enters an item name, I would like something like a dynamic action to fire, populating the ITEM_ID.
    e.g User enters part no ABC into the dummy field. When they tab out, I want the value to the item_id field on the tabular form row to be populated based on a SQL query in a similar fashion to how it can be done with dynamic actions on text items on a form.
    I am using APEX v4.0.0
    Thanks in advance
    Chris

    Hello Chris,
    Why can't you use Select List Item on tabular form, which will display all item_names and return item_ids?
    If the list is huge and you need users to type & search, then you can use Pop-up LOV item.
    Regards,
    Hari

  • Is it possible to make a search help with dynamic  selection table?

    Hi Experts,
    Is it possible to create search helps with dynamic seletion tables means
    i dont know the selection table names at the time of creation of search help.
    These tables will be determined at runtime.
    if yes, Please give an idea how to create and pass the table names at runtime.
    Thanks
    Yogesh Gupta

    Hi Yogesh,
    Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'field to return from itab'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'field on your screen to be filled'
          stepl           = sy-stepl
          window_title    = 'some text'
          value_org       = 'S'
        TABLES
          value_tab       = itab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    Darley

  • HELP Filtering and IReport with Dynamic Actions

    Hi all,
    Now that I've upgraded to 4.0, I'm trying to make more use of Dynamic Actions. I followed the example at: http://anthonyrayner.blogspot.com/2010/07/report-filtering-with-apex-40-dynamic.html and it works fine. The thing is that it is based on a select list which kind of takes away from the effect. What I want is to have an interactive report which is filtered by the value in a text box. I want to use a dynamic action that when a user types a search string, the IR is filtered down based on each character typed. I used the "Change" Event on the text box and the Refresh action on the report region for the IR, but it only refreshes when I "Enter" (submit). Any ideas on how I can get an AJAX-like action using dynamic actions?
    Thanks!!!

    Hi,
    See this post
    APEX 3.2 Refresh interective report
    It works also for Apex 4.
    You can call javascript that set your item session state and refresh IR like in that post
    Regards,
    Jari

  • Refresh report title with dynamic action

    Hi all,
    I have a report that is refreshed with an dynamic action. When the refresh is performed, first the value of two hidden variables are set (P2_ID and P2_NAME) and are submitted (using a dynamic action type 'pl/sql', with code 'null;' and page items to submit: P2_ID,P2_NAME).
    In the query of the report, i use :P2_ID in the where-clause. That's all working like a charm! The one thing that doen't work, is the title of the region: that's defined as 'Properties of &P2_NAME.', but the title isn't refreshed when the report gets refreshed.
    Is there a solution for this? I hope I'm clear enough.

    See Re: Dynamic action - Refresh
    So you are right; the native Refresh action just refreshes the report content, it does not perform &ITEM. substitutions everywhere in the region.
    What you could do is use a named SPAN as the title like <span id="my_title">&P2_NAME.</span> and add a TRUE action to your Dynamic Action to set the title using Execute Javascript code $s('my_title',$v('P2_NAME'));Hope this helps.

  • Performance issues with dynamic action (PL/SQL)

    Hi!
    I'm having perfomance issues with a dynamic action that is triggered on a button click.
    I have 5 drop down lists to select columns which the users want to filter, 5 drop down lists to select an operation and 5 boxes to input values.
    After that, there is a filter button that just submits the page based on the selected filters.
    This part works fine, the data is filtered almost instantaneously.
    After this, I have 3 column selectors and 3 boxes where users put values they wish to update the filtered rows to,
    There is an update button that calls the dynamic action (procedure that is written below).
    It should be straight out, the only performance issue could be the decode section, because I need to cover cases when user wants to set a value to null (@) and when he doesn't want update 3 columns, but less (he leaves '').
    Hence P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||')
    However when I finally click the update button, my browser freezes and nothing happens on the table.
    Can anyone help me solve this and improve the speed of the update?
    Regards,
    Ivan
    P.S. The code for the procedure is below:
    create or replace
    PROCEDURE DWP.PROC_UPD
    (P99_X_UC1 in VARCHAR2,
    P99_X_UV1 in VARCHAR2,
    P99_X_UC2 in VARCHAR2,
    P99_X_UV2 in VARCHAR2,
    P99_X_UC3 in VARCHAR2,
    P99_X_UV3 in VARCHAR2,
    P99_X_COL in VARCHAR2,
    P99_X_O in VARCHAR2,
    P99_X_V in VARCHAR2,
    P99_X_COL2 in VARCHAR2,
    P99_X_O2 in VARCHAR2,
    P99_X_V2 in VARCHAR2,
    P99_X_COL3 in VARCHAR2,
    P99_X_O3 in VARCHAR2,
    P99_X_V3 in VARCHAR2,
    P99_X_COL4 in VARCHAR2,
    P99_X_O4 in VARCHAR2,
    P99_X_V4 in VARCHAR2,
    P99_X_COL5 in VARCHAR2,
    P99_X_O5 in VARCHAR2,
    P99_X_V5 in VARCHAR2,
    P99_X_CD in VARCHAR2,
    P99_X_VD in VARCHAR2
    ) IS
    l_sql_stmt varchar2(32600);
    p_table_name varchar2(30) := 'DWP.IZV_SLOG_DET'; 
    BEGIN
    l_sql_stmt := 'update ' || p_table_name || ' set '
    || P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||'),'
    || P99_X_UC2 || ' = decode('  || P99_X_UV2 ||','''','|| P99_X_UC2  ||',''@'',null,'|| P99_X_UV2  ||'),'
    || P99_X_UC3 || ' = decode('  || P99_X_UV3 ||','''','|| P99_X_UC3  ||',''@'',null,'|| P99_X_UV3  ||') where '||
    P99_X_COL  ||' '|| P99_X_O  ||' ' || P99_X_V  || ' and ' ||
    P99_X_COL2 ||' '|| P99_X_O2 ||' ' || P99_X_V2 || ' and ' ||
    P99_X_COL3 ||' '|| P99_X_O3 ||' ' || P99_X_V3 || ' and ' ||
    P99_X_COL4 ||' '|| P99_X_O4 ||' ' || P99_X_V4 || ' and ' ||
    P99_X_COL5 ||' '|| P99_X_O5 ||' ' || P99_X_V5 || ' and ' ||
    P99_X_CD   ||       ' = '         || P99_X_VD ;
    --dbms_output.put_line(l_sql_stmt); 
    EXECUTE IMMEDIATE l_sql_stmt;
    END;

    Hi Ivan,
    I do not think that the decode is performance relevant. Maybe the update hangs because some other transaction has uncommitted changes to one of the affected rows or the where clause is not selective enough and needs to update a huge amount of records.
    Besides that - and I might be wrong, because I only know some part of your app - the code here looks like you have a huge sql injection vulnerability here. Maybe you should consider re-writing your logic in static sql. If that is not possible, you should make sure that the user input only contains allowed values, e.g. by white-listing P99_X_On (i.e. make sure they only contain known values like '=', '<', ...), and by using dbms_assert.enquote_name/enquote_literal on the other P99_X_nnn parameters.
    Regards,
    Christian

  • Problem with dynamic actions

    Hi,
    I am creating the following dynamic action configuration for my custom infotype 9902. My requirement is to Insert a new record of Additional payments (0015) infotype with wagetype (LGART) = 9GHS and Amount(BETRG) = 1000 when the value in field "ALL_ENROLL" is created/changed.
    <u><b>INFTY|SUBTY|FIELD             |FC|No|S  | Variable function</b></u>
    <b>9902      |           |ALL_ENROLL |06 |20 |I   | INS,0015,,,(P9902-BEGDA),(P9902-ENDDA)
        9902  |           |ALL_ENROLL | 06|30 |W| P0015-LGART='9GHS'
        9902  |           |ALL_ENROLL |06 |40 |W| Q0015-BETRG='100000'</b>
    The dynamic action is getting triggered properly with Wagetype(LGART) being populated properly. But the value in Amount(LGART) is not getting populated. The technical details of the amount field shows the field as Q0015-BETRG.
    Can someone help me in acheiving this?
    Thanks,
    Prasath N

    Problem solved. The documentation for dynamic action states that,
    <b>Do not set defaults for Q fields of an infotype because the values for these fields are derived from the corresponding P fields.
    Examples
    Infotype  Subtype  ..... FC  Ind.  Variable function part
    0021       2              04  I     INS,0015,M430
    0021        2              04  W     P0015-BETRG='10000'
    When a Family/Related Person record (0021) record with subtype 2 (child) is created, an Additional Payments record (0015) with a default amount of 100.00 is created.
    </b>
    Thanks,
    Prasath N
    Message was edited by:
            prasath natesan

  • Need help in Dynamic Actions

    Hi Experts,
    I have a requirement to create Additional Payments for two wage types 591 and 691 for a particular Employee subgroup and for three personnel areas whenever a person is hired. I have written the code like this
    400           *BEK047.01 RECURRING PAYM 591 / 691
    401     P     PSPAR-MASSN='01'
    402     P     P0001-PERSK='AA'
    403     P     P0001-WERKS='037'
    404               P                    P0001-Werks='039'/X
    405               P                   P0001-WERKs='041'/X
    406     I     INS,0014/D
    407     W     P0014-LGART='0591'
    408     W     P0014-BETRG='109'
    409     W     P0014-ZANZL='1'
    410     W     P0014-ZEINZ='012'
    411     W     P0014-ZDATE=P0001-BEGDA
    412     W     P0014-BEGDA=P0001-BEGDA
    414     W     P0014-ENDDA=P0001-ENDDA
    Apparently above code doenst work . I removed the OR condition and write the code three times for diff personnel area and that works. So i wanted to know what is wrong in above code. Also when records are created they should be defaulted with the amount mentioned in the code i.e. 109 .....but somehow some other value is coming which i havent entered.
    Please help
    Regards,
    Navneet.

    Dear Navneet
               your dynamic action shows that you want to default the valued in the Recurring Payment and Deductions but not the Additional Payments. Usually the Indicator /X is used with the condition is endup with Logical OR.
    Try out the following values and test
    IT            FC     Num     Indi     Variable Function Part
    0001     04     101     P     T001P-MOLGA='40'
    0001     04     102     P     P0000-MASSN='01'
    0001     04     103     P     P0001-PERSK='AA'
    0001     04     104     P     P0001-WERKS='037'
    0001     04     105     P     P0001-WERKS='039'
    0001     04     106     P     P0001-WERKS='041'
    0001     04     107     I     INS,0014,,,(P0001-BEGDA),(P0001-ENDDA)/D
    0001     04     108     W     P0014-LGART='0591'
    0001     04     109     W     Q0014-BETRG='109'
    0001     04     110     W     P0014-ZDATE=P0001-BEGDA
    0001     04     111     W     Q0014-ZANZL='1'
    0001     04     112     W     Q0014-ZEITX='Months'
    If the above coding is not working, Tryout individually for every condition seperately starting from 3rd line and followed by I like followes.
    0001     04     101     P     T001P-MOLGA='40'
    0001     04     102     P     P0000-MASSN='01'
    0001     04     103     P     P0001-PERSK='AA'
    0001     04     107     I     INS,0014,,,(P0001-BEGDA),(P0001-ENDDA)/D
    0001     04     108     W     P0014-LGART='0591'
    0001     04     109     W     Q0014-BETRG='109'
    0001     04     110     W     P0014-ZDATE=P0001-BEGDA
    0001     04     111     W     Q0014-ZANZL='1'
    0001     04     112     W     Q0014-ZEITX='Months'

  • Need Help calling Dynamic Action from Link in Interactive Report

    Hello I have an Interactive Report. I would like to have a Dynamic Action called when the user selects a row (Clicks a Link).
    I am running Application Express 4.0.2.00.07 on Oracle 11gR1.
    Any help would be great.

    Hi VANJ,
    Sorry for the poorly written original post. I will be much more specific.
    I have a Interactive Report on page 40. That report has a column named X_UID that is a link back to page 40 and sets a text item named P40_X_UID in a Region we will call "Form X" with the value of the column. That page refresh also then calls a Automated Row Fetch process to fetch all the values needed for the rest of the page items in the "Form X" region. Also "Form X" region has a conditional display on to only display when P40_X_UID is not null.
    What I would like to do:
    When the user clicks on link in the IR for X_UID instead of the "Form X" region becoming visible I would like to become modal. I am trying to use a Plug-In named "ClariFit Simple Modal - Show". I have it working with a Dynamic Action when you click a Page Item. But I would like to to work when the link is clicked and the data populated.
    I hope that helps some.

  • Help with dynamic page layouts

    Hello JSP Gurus,
    I'm attempting to dynamically generate the page layout for my site based on the organization a user belongs to. Basically, I'd have certain resources like navigation links, graphics, etc, that are modular. Then I'd like to construct the layout using these "moduls" in a dynamic fashion. Does anyone have any suggestions on techniques or technologies that would be useful? I'm not really looking at the portal/portlet model. Is this something that Cocoon could do by storing the layout for each customer as an XML file or something? Any ideas, suggestions, experiences would be helpful.
    Thanks!

    How does Tiles differ from the JetSpeed apache
    project? They both appear to be portal-like
    frameworks, or am I incorrect about that? Which is
    preferred?Frankly, I can't give you an in-depth answer to that. Maybe someone else can help with more details.
    What I can tell you is that JetSpeed seems to be more of a real portal architecture. Emphasis is placed on the framework portion, interfacing with exisiting applications. Visual layout takes second seat to this.
    Tiles on the other hand puts more emphasis on visual layout and reuse.
    Just looking at JetSpeed's visual interfacing a little bit makes me really dislike it. You build tables and such inside of a servlet, so there's a tight coupling (or at least, much tighter than with Struts/Tiles) between the presentation and logic. (I'm basing this on a JavaWorld article at
    http://www.javaworld.com/javaworld/jw-07-2001/jw-0727-jetspeed.html )
    Based on your initial question, it would seem to me that tiles is much closer to what you're looking for (and likely easier to just pick up and use).
    Anyway, take all this with a grain of salt; I'm not exactly an expert on JetSpeed. =)

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • Smartform of a particular employee with dynamic actions

    Hi All,
    I am making an HR smartform - pulling data from infotypes  - so I am using logical database pnp. Now Everytime I enter the personal number in the PNP screen, it gives me form with correct data of respective employee.
    I want to club this smart form's driver program to a dynamic action, so the personal number would ne chosen dynamically. For that I believe we have to choose HR report category from program attributes of driver program as '0000003'.
    If I  do that and hardcode the employee number it do not takes it but it starts printing smartforms of all the employees - even if I keep the report category as 0000001, it asks for a personal number at runtime,n do not takes hardcoded value - The getpernr statment is not fetching up the data for that particular employee but it pulls data for all employees.
    Please suggest how could I use the hard coded value of pernr to get the resp3ective data in the smartform. Do I have to create another report category - a new one? if so how?
    If u have any sample code? Please share it.
    Thanks
    Ribhu

    Hi Suresh, I was just testing it by hardcoding, wheather it takes the pernr from places other than input box of the report category. Right.
    Below is the code. If you want to know anything else, Please let me know.
    Thanks
    Ribhu
    Here is the code:
    REPORT  ZHRtest.
    tables : q0008, pa0001, pa0000, pa0002, pa0014, pa0021, pa0022, pa0008, pa0006, pernr, t500p,t530, t512t, t510, t526, t529t, t528t,
             M_PLOMC, T7INA3, T7INB5, T7INB7, T518B.
    infotypes : 0000, 0001, 0002, 0014, 0021, 0022, 0008, 0006, 0105, 9003.
    data : E_DATE   TYPE SY-DATUM, " Date
           E_ORGUNIT TYPE ORGEH, " Organizational Unit
           E_PERSNO     TYPE P_PERNR, " Personnel Number
    DATA : WS_UCOMM LIKE SY-UCOMM.
    data: begin of pers_tab occurs 0,
    E_SLAB1MIN     TYPE     PIN_MINBS,
    E_SLAB1MAX     TYPE     PIN_MAXBS,
    E_SLAB1INCR     TYPE     PIN_AMINC,
    E_SLAB2MIN     TYPE     PIN_MINBS,
    E_SLAB2MAX     TYPE     PIN_MAXBS,
    E_SLAB2INCR     TYPE     PIN_AMINC,
    end of pers_tab.
    DATA: BEGIN OF WAGETYPES,
    E_LGA LIKE P0008-LGA01,
    E_BET LIKE P0008-BET01,
    E_pernr like pernr-pernr,
    END OF WAGETYPES.
    data : E_lga like pa0008-lga01,
           E_bet like pa0008-bet01.
    data: count type i.
    data : v_year(4) type c,
    v_mon(2) type c,
    v_date like sy-datum,
    v_date1 like sy-datum.
    data : v_formname type tdsfname ,
           v_fmname type rs38l_fnam.
    data: i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
    DATA : WAGETYPES1 LIKE BAPIP0008P OCCURS 0 WITH HEADER LINE.
    data: begin of temp_tab occurs 0 ,
    t_minbs type PIN_MINBS,
    t_maxbs type PIN_MAXBS,
    t_aminc type PIN_AMINC,
    end of temp_tab.
    data: hr_pernr like p0000-pernr, " persno of hr emp
    plans_hr like p0001-plans . " position text.
    constants : c_x type c value 'X', " Sign
    c_pernr(8) type n value '00000000', " Pernr
    c_val1(2) type c value '31', " Date Type
    c_val2(2) type c value '12', " Date Type
    c_val like p0041-dar01 value '01', " Date Type
    c_1 like pernr-persg value '1', " Emp Group
    c_type like hrp1001-otype value ' ', " Object Type
    c_date1 like sy-datum value '18000101', " Date
    c_date2 like sy-datum value '99991231', " Date
    r_all value 'X'.
    selection-screen begin of block b2 with frame title text-001.
    selection-screen begin of line.
    parameter pdf radiobutton group smf.
    selection-screen comment 5(20) text-002.
    parameter prn radiobutton group smf.
    selection-screen comment 40(20) text-003.
    selection-screen end of line.
    selection-screen skip 3.
    selection-screen begin of line.
    selection-screen comment 3(30) text-007.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 5(30) text-004.
    parameter p1 radiobutton group pg.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 5(30) text-005.
    parameter p2 radiobutton group pg.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 5(30) text-006.
    parameter p3 radiobutton group pg.
    selection-screen end of line.
    Selection-screen end of block b2.
    ws_ucomm = sy-ucomm.
    *CLEAR PERNR.
    *CLEAR PNPPERNR.
    At selection-screen.
      perform validate_screen.
    start-of-selection.
      perform get_period.
    PERNR-PERNR = 27.<b> <<<<< ----- this is where i tried to hard code</b>
    PNPPERNR-LOW = 27.
      get pernr .
    LOOP AT PERNR.
    *IF PNPPERNR-LOW NE PERNR-PERNR.
    *CLEAR PERNR.
    *ELSE. EXIT.
    *ENDIF.
    *ENDLOOP.
    **PNPPERNR-HIGH = ''.
    E_PERSNO = PNPPERNR-LOW.
      rp_provide_from_last p0000 space pnpbegda pnpendda.
      rp_provide_from_last p0002 space pnpbegda pnpendda .
      rp_provide_from_last p0021 space pnpbegda pnpendda.
      rp_provide_from_last p0022 space pnpbegda pnpendda.
      rp_provide_from_last p9003 space pnpbegda pnpendda.
      describe table p0008 lines count.
      describe table p0001 lines count.
      PERFORM FORM_SELECTION changing P1 P2 P3."<----
    To get the fathers name.
      select FAVOR FANAM from pa0021 into corresponding fields of p0021 where pernr = E_PERSNO and FAMSA = '11'.
        if sy-subrc = 0.
          E_FIRSTNAME = P0021-FAVOR.
          E_LASTNAME = P0021-FANAM.
        endif.
      endselect.
    FORM validate_screen .
    CLEAR PERNR. <b><<<<< ----- this is where i tried to hard code</b>
    PERNR-PERNR = '00000027'.
    PNPPERNR = '00000027'.
    **PNPPERNR-HIGH = ''.
      E_PERSNO = pnppernr-low.
      p9003-pernr = 27.
    *E_PERSNO = p9003-pernr.
    pnppernr-low = E_PERSNO.
    clear sy-index.
    loop at pnppernr.
    endloop.
    if sy-index GT 1.
       message 'Enter only one personal number' type 'E'.
    endif.
    if pnppernr-low is initial.
    PNPPERNR-LOW = '27'.
    message 'enter a personal number' type 'E'.
    endif.
    ENDFORM.                    " validate_screen

  • Multiple Select List does not Refresh with Dynamic Action

    All,
    Scenario:
    Using APEX 4.2.2, I have a Select List page item (P4_SPONSOR) set to allow multiple values which has a dynamic LOV to populate the list.  What I would like to do is highlight the display values based on another page item's value (P4_DRIVER_ID).  When I set the source of P4_SPONSOR to static text, such as a delimited string of 1:2:3:4, any display values where the return values are equal to the static text are highlighted when the page loads.
    Problem:
    The problem lies in trying to use a query as a source for P4_SPONSOR which is filtered based on the other page item, P4_DRIVER_ID.  For instance, my SQL Query (returning colon separated values) returns the same as the static text noted above.  In the query's WHERE clause, I specify that the driver's ID is equal to P4_DRIVER_ID:
    SELECT sponsor_id
    FROM sponsors_drivers_xref
    WHERE driver_id = :P4_DRIVER_ID;
    This, as I understand it, would necessitate a refresh of P4_SPONSOR whenever the value of P4_DRIVER_ID changes.  So, I have a Dynamic Action that does just that.  When executed on the page, I can see the P4_SPONSOR multiple select list actually refresh, but none of the display values become highlighted.
    Thoughts?
    Thanks,
    -Seth.

    Seth,
    A dynamic action refresh of your select list will refresh the list of values (this is what you are seeing), it will not refresh the value of the item itself.  In fact, it will remove any values that you had already selected.  To refresh the value you will need to add additional dynamic actions.
    Create another dynamic action with:
    Event: After Refresh
    Selection Type: Item(s)
    Item(s): P4_SPONSOR
    If this was a normal select list you could just create a Set Value action and use your query to set the value of the select list.  Since this is a multiple select list your will need to get your colon delimited value first and then use some javascript to set the values of your select list.
    Create an hidden page item name P4_SPONSOR_TEMP.
    Add a true action to your new dynamic action:
    Action: Set Value
    Set Type: SQL Statement
    SQL Statement:
    SELECT sponsor_id
    FROM sponsors_drivers_xref
    WHERE driver_id = :P4_DRIVER_ID;
    Page Items to Submit: P4_DRIVER_ID
    Selection Type: Item(s)
    Item(s): P4_SPONSOR_TEMP
    Add another true action to your new dynamic action:
    Action: Set Value
    Set Type: JavaScript Expression
    JavaScript Expression:
    $("#P4_SPONSOR_TEMP").val().split(":")
    Selection Type: Item(s)
    Item(s): P4_SPONSOR
    --Jeff

  • Need help with Dynamic Excel File Name please.

    I am try to output an excel file with dynamic date. 
    Here what I done.
    I am using SQL 2012.
    Create Execute SQL Task Connect Type: Excel
    Create Data Flow Task set to DelayValidation: True
    Create OLE DB Sourc
    Create Data Converstion
    Excel Destination
    Excel Connection, Expression, select ExcelFilePath
    @[User::sXLFilePath] +  @[User::sFileName] + RIGHT("0" + (DT_WSTR, 2) DATEPART("DD", GETDATE()), 2)+ RIGHT("0" + (DT_WSTR, 2) DATEPART("MM", GETDATE()), 2) + RIGHT((DT_WSTR,
    4) DATEPART("YYYY", GETDATE()), 2) +".csv"
    C:\ExcelOutPut\SOX_CAM_SQL_Report_010215.xls
    What I try to accomplish is output the file with each day append to it, date must be DDMMYY.
    I google it and found many samples, tested it, and none of them is work for me. 
    Any suggestions or some examples to share is greatly appreciate. 
    I am new to SSIS.  I found one poster have similar issue and inside the posted below, there was one suggestion to create variable and connection string but how do I bind that variable to Excel Connection manger.
    Please help.
    Thank you so much in advance.
    Ex: SOX_CAM_SQL_Report _020215.csv
           SOX_CAM_SQL_Report _030215.csv
    --Similar issue:
    https://social.msdn.microsoft.com/Forums/en-US/bda433aa-c8f8-47c9-9e56-efd20b8354ac/creating-a-dynamic-excel-file?forum=sqlintegrationservices
    Suggestion in the above posted but where can bind this to Excel Connection Manger. 
    Please help provide step by step.  Thanks.
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\temp\\" + "ExcelTarget" + (DT_WSTR,4)DATEPART("yyyy",GETDATE())  +
    ".xls" + ";Extended Properties=\"EXCEL 8.0;HDR=YES\";"
    And yes, as you were intimating, the delay validation on the dataflow should be set.

    Hi NguyenBL,
    According to your description, you created ssis package to export data from database to excel, when the package runs, you want to create new excel and name the file with time stamp. If that is the case, we can achieve the goal by following steps:
    Create a script task used to create excel files.
    Create a data flow task to export data from database to excel.
    Add OLE DB source to data flow task.
    Add Excel Destination to data flow task.
    Create connection manager for OLE DB and Excel.
    Click Excel Connection Manager, in Properties window, click (…) button next to Expressions, then set ExcelFilePath with expression like below:
    "C:\\ETL Lab\\CreateNewExcel\\ExportData_"+REPLACE((DT_STR, 20, 1252)(DT_DBTIMESTAMP)@[System::StartTime], ":", "")+".xls"
    For detail information, please refer to the document:
    https://sqljourney.wordpress.com/2013/01/12/ssis-create-new-excel-file-dynamically-to-export-data/
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • I have developed a little tool to help with Dynamic Tabular Forms....

    I have created a little framework which will help people to develop dynamic actions in tabular forms.
    It currently only supports text and display only but if necessary I'm willing to expand this little tool...
    You can find it here: http://linuxservernico.no-ip.info:8888/JSON_Tabular_form.zip
    Please let me know of what you think about it and how to improve it...
    To be continued,
    Nico

    The problem is that APEX doesn't support dynamic actions and plugins on a tabular form (not yet).
    For now my implementation is just on overloading of the apex_item implementation of apex.
    Check the readme.txt for installation it isn't that hard but you need to understand the context.
    Thnx for the positive response
    Br,
    Nico

Maybe you are looking for