Passing Session Values to the Tabular Form Element of a Report Column

Hello,
I'm running application express version 2.0 with a 10.2.0.2.0 database on a 32 bit windows box. I'm trying to figure out sneaky a way to pass the &APP_PAGE_ID., #APP_PAGE_ID# or V('APP_PAGE_ID'); as an element attribute of a Report Tabular Form Element set to display as a Select List (named LOV).
It seems that whatever option I choose, the Element Attributes field will only render the literal value of what I have entered. This is part of the solution but I would like to find a way to pass the current page id.
What I'm trying to do is utilize the ONCHANGE attribute to redirect to a report page in my application when the value from a Select List (named LOV) is selected.
I could work around this by creating my own table output with PL/SQL and HTP.P commands but would really be interested in finding out if I can use the reporting structures which are already available through Application Express.
Any ideas?
Thanks.
Justin.

Thanks for the response Earl. To clarify this is what I've done and what I hope to achieve:
I currently have a LOV for my application that identifies a number of database report types: DB Options, DB Parameters, DB Version, and so on.
I have an application express report being generated for the databases I'm monitoring and it displays as follows:
- HOST -- DBTYPE -------- DBNAME - DBREPORTS
=====================================
- SVR 1 - Oracle 9.2.0.1 - DEV -------- [LOV HERE]
- SVR 2 - Oracle 9.2.0.7 - TST --------- [LOV HERE]
I am displaying the LOV on my report the the options under the reports attribute tab in my application builder. I insert my LOV select list by editing the DBREPORTS column and set the "Display As:" option under Tabular Form Element to "Select List (named LOV)"; I have also added my LOV to the "Named LOV" option under List of Values.
So far this achieves everything I would expect and works quite well (a select list with my report types appears in my monitor report for each DB that is returned).
What I'm interested in doing now is opening a DBREPORT for a given database by simply choosing the report type from my LOV. I can set the "Element Attributes" option under Tabular Form Element to execute a javascript call for any valid event (in my case I'm using ONCHANGE).
My only issue is that I cannot find a way to pass any session values from my page to my Element Attribute. If, in the Element Attributes field I enter:
onchange="alert(this.value);" //my dialogue box will display the value of my current selection when I choose a report type.
What I'd love to be able to do is something like:
onchange="alert('&APP_PAGE_ID.');" //so my current page id is written to the element.
Unfortunately, only my literal text seems to be rendered. Rather than having my dialogue come back with my page number, say 75, I receive the literal value &APP_PAGE_ID.
Notwithstanding any quote issues, I've tried to dump a test html attribute to my source html by entering any of the following in the Element Attributes field:
test=&APP_PAGE_ID.
test=#APP_PAGE_ID#
and as a shot in the dark knowing that I'm not using PL/SQL:
test=V('APP_PAGE_ID');
In every case when I view source I see the literal value of what was entered in the Element Attributes field (ie "test=&APP_PAGE_ID." instead of "test=75").
What makes things a little more frustrating is that I can drop &APP_PAGE_ID. into the Column Heading field (ex My Heading &APP_PAGE_ID.), it renders as I would expect; "My Heading 75". If we could find a solution to this, I could see a number of slick uses for this type of functionality.
Hope this helps,
Thanks.
Justin.

Similar Messages

  • Column value substitution in tabular form element attributes

    We started to discuss this at Re: Tabular form with Ajax
    I also mentioned this at Re: how to make only some rows editable in html db.
    but thought that this deserves its own thread.
    In Doug's sample Sudoku application in that thread, he uses #COLUMN# substitution in the Form Element Attributes and it works fine, but in my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:219 I used the same technique and no matter what I do, the #COLUMN# substitution is not expanded by the Apex engine.
    This is driving me nuts, any ideas why it works in one application but not in another?
    Thanks

    Hm, you might be right.
    I copied your row template and modified it at http://htmldb.oracle.com/pls/otn/f?p=24317:219
    The styling looks terrible, not sure why, the template is simply
    <tr>
    <td class="t10data">#EMPNO_DISPLAY#</td>
    <td class="t10data">#ENAME#</td>
    <td class="t10data">#JOB#</td>
    <td class="t10data">#MGR#</td>
    <td class="t10data">#HIREDATE#</td>
    <td class="t10data">#SAL#</td>
    <td class="t10data">#COMM#</td>
    <td class="t10data">#DEPTNO#</td>
    </tr>I had a lot of trouble getting this to work because the wizard generated tabular form appends 2 hidden fields containing the PK and the row-checksum to the last (editable?) field on each row. If the last editable field has #COL# substitution, it expands the substitution and forgets to close the INPUT tag thus causing malformed HTML (I think this is a bug in the rendering engine).
    The readonly condition is sal>1000 which now works. The SAL>1000 fields are now readonly.
    But now the update process is broken. If I enter a number in the first blank SAL field (empno=3641) and click Submit, I get no errors but the change is not saved. Wonder why.
    Hopefully, Scott (Spadafore) will take mercy on our amateurish experiments and give us some definitive answers soon!
    Thanks.

  • How to Set Default Value into a Tabular Form Element

    Hi,
    Hoping someone can assist with my Tabular Form query.
    I am using Oracle ApEx v3.0.1
    I was wondering how one can set a default value to one of my tabular form columns within Oracle ApEx v3.0.1 as I cannot see how to do it?
    Thanks.

    Hi Tony
    can you pl. help me how you resolve this? I have one tabular form and I am trying to set default value as :APP_USER, I type this in default value but somehow it is not displaying this value.
    thanks
    Dax

  • Setting a Default Value within a Tabular Form

    Hi All,
    Using Apex 2.2.1
    Hoping someone can assist. I have the following two scenarios where I would like to set a default value to a column within a tabular form.
    Scenario One:
    Prior to actually displaying the tabular form on the page, I have a region on this page where I ask the user to select a Application No. first (using a Select List with Submit). Once this item, say P50_APP is set to a value, the Tabular Form region is then presented to the user by where I then allow them to enter certain information required using the 'Add Row' button. One of the columns within this tabular form also represents the Application No.
    My questions are:
    a) I have made the Application No. within the tabular form as a LOV, so when the user hits the 'Add Row' button, how can I set the initial value to P50_APP value using the 'Default Type and Default' items within the column?
    b) Since I am trying to achieve a master-detail type scenario here, if (a) above is not possible, if I hide the Application No. column within the tabular form, how can I set it to P50_APP when the user presses either the 'Add Row' or 'Submit' buttons?
    Scenario Two:
    Is it possible to pass a value from a tabular form, i.e a column within this tabular form on one page, to another tabular form column on a another page (when the user presses the 'Add Row' button) within the same application?
    For example, on page 50 I have the column #APP_NUMBER# passed onto page 60 which is another tabular form that also holds the same column name #APP_NUMBER# , so when the user on page 60 hits the 'Add Row' button, I would like the App Number column default to the one just passed over from page 50.
    Is this possible?
    Apologies if I am asking the same things in both scenarios - just want to make sure I understand MRUs.
    Thanks.
    Tony.

    Hi Andy,
    Thanks for getting back to me but I think you are referencing these default values in the wrong section.
    What I am actually trying to set is the value of a column within a tabular form to P50_APP and it seems to me that the only available options for setting default values on a tabular form column are by using:
    Default Type: which can be one of:
    No Default
    Item (application or page item name) or
    PL/SQL Expression or Function
    and then actual source is set against:
    Default:
    Unsure as to how to actually set the value of P50_APP which is in session to the individual tabular column mentioned above.
    FYI, I have tried selecting for Default Type: Item (application or page item name) and then specifying for Default:&P50_APP. as well as Default Type:PL/SQL Expression or Function and specifying for Default: :P50_APP but to no avail.
    Tony.

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • How to pass a value from the report to a form ( BIT OF URGENT ).

    Hi,
    I had created a "Form on a Table with Report" on the report I had remove the edit link and set one of the column feilds that functionality. Now I want to know how to pass that value that is clicked ( having hyper link ) on to the form where it runs a SQL query and then displays the reuslts on the form.
    Illustrating with an example.
    I am having these following columns on the report ( these are the results for the join statement )
    JOBNUM JOBNAME DEPTNUMBER SAL EMPNO LNAME FNAME
    In the above JOBNUM is having Hyper link as I removed the edit image.
    Now this is area I am having problem. When the user clicked on the JOBNUM then on form it should display 20 other columns( pulled from 5 other tables ) which are related to that particualr JOBNUM.
    Anybody give me a solution in which area I have to include my SQL statement and how to pass that selected value to that SQL statement.
    Cheers,
    Krishna

    Hi Ron,
    I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
    I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
    Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
    Thanks for your help in advance.
    Cheers,
    Krishna.

  • Coloring the changed values  in a tabular form

    Hi,
    I have a tabular form (Sql query updatable report) which displays the data from table1, in this I need to color code the fields whose value is different from a similar column in table2. In simple how can I add color tag in the sql query. I tried using the below
    select <&ltdiv style="background:red;color:red">||LAST_NAME||<&lt/div> LAST_NAME, first_name from table1
    but it sets the div tag part as LAST_NAME input field's value.
    Any suggestions please ?
    Thanks,
    Pourush
    Edited by: Pourush Gopal on Apr 1, 2009 10:41 AM
    Edited by: Pourush Gopal on Apr 1, 2009 10:41 AM
    Edited by: Pourush Gopal on Apr 1, 2009 10:41 AM

    Try this (with quotes around the div tags):
    select '&lt;div style="background:red;color:red">'||LAST_NAME||'&lt;/div>' LAST_NAME, first_name from table1

  • How to set a column value in a tabular form via button

    Hi All,
    I am using Apex 3.0.1. And to create the form I am using the APEX interface tool
    I have tabular updateable report. In the same page I have a LOV field where I can choose some possible results.
    I want to have a button so I can select a value in the LOV, take this value and populate the column value to the LOV value for all rows in the tabular form.
    The LOV and the buttons are done.. to update the column I tried creating a pl/sql that is executed when the button is pressed and has the following update in a loop for each element:
    begin
    for i in 1..APEX_APPLICATION.g_f01.count loop
    APEX_APPLICATION.G_F02(i) := :P1_MY_LOV_VALUE;
    end loop;
    commit;
    end;
    When I press the button, the page refreshes but nothing happens. I don't see any changes in the Values for the column I am trying to update
    Thanks

    Hi user477501,
    If you are doing this after a SUBMIT, then try updating your data table instead of the g_f02 array. When you page is re-rendered, it should re-query your data table.
    If you do not want to submit the page, then try your hand at JavaScript.
    A good reference for this is Mike Hichwa's article at:
    http://www.oracle.com/technology/oramag/oracle/06-nov/o66browser.html
    Be sure to download the example application, it is very helpful.
    I hope this helps.
    Patrick

  • How to get the value of the current form values after "save" in MD form

    Hi,
    I am trying to run a procedure using the form values right after I save the current records in a master-detail form. When I pass the value using p_session.get_value to the procedure, there is only null value passed. I checked the package body generated and found that the OnReset function runs immediately following the saving of the current records and this onReset function is called within the OnSave procedure. So when I save the current changes, I loose the values in the p_session. Any PL/SQL code I write after OnSave, does not get any p_session value.
    Interestingly, in case of just one table form, the OnReset is not within the OnInsert function and it is possible to get the p_session values. OnReset runs after OnInsert and within this two functions we can write any pl/sql code on the Insert button PL/SQL handler.
    I have the following questions:
    1. Why is the procedure written differently in case of master-detail form ? Why is the OnReset inside the OnSave ? How do we write codes which we want to execute before onReset and after OnSave ?
    2. I want to run a procedure after onSave and before OnReset. How do I do that ? Do I have to change the package manually ?
    3. If the above is not possible, I can also try to store the values I need to run the procedure before I save in some variable. How do I do that ? It seems I cannot declare variables to store session values inside the pl/sql event code on Save button, because it gives me error. The variable declaration code goes in between the begin and end of genesys.. procedure and that is not allowed in pl/sql
    Please help me with this. I definitely need to run a procedure after saving for almost all of my forms. Otherwise I am not sure what to do with my development. I am completely stuck with this. Thanks a lot for helping me out.
    Mainak

    Never mind. I found the answer.

  • How to Pass Parameter/Value to the second page????

    Hi,
    I am trying to display same popup window when I click on ADD,UPDATE and VIEW buttons. I don’t have any problem in displaying the popup when I click on ADD and UPDATE button but with VIEW button I wanted to display the popup at read only mode. In order to do that I have created a bean with session scope and set a ‘SetActionListener‘on VIEW button and set ‘from’ property to true and ‘to’ property to "#{IndividualSummaryDetails.readOnlyAddress}". I could not pass the value of readOnlyAddress to the popup. How can I pass the value of readOnlyAddress to the popup?
    This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
    Here is my View button
    <af:commandButton text="#{CoreProperties['Global.commandButton.View']}"
    windowHeight="450" windowWidth="600"
    useWindow="true"
    action="dialog:FromIndividualSummaryDetailsToAddress"
    id="justView">
    <af:setActionListener from="#{true}"
    to="#{IndividualSummaryDetails.readOnlyAddress}"/>
    Here is my Bean
    public class IndividualSummaryDetails {
    private Boolean readOnlyAddress;
    public IndividualSummaryDetails() {
    readOnlyAddress = true;
    public Boolean isReadOnlyAddress() {
    return readOnlyAddress;
    public void setReadOnlyAddress(Boolean readOnlyAddress) {
    this.readOnlyAddress = readOnlyAddress;
    This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
    Message was edited by:
    V.Piraba

    We need to use portlet events for sending parameters across different pages.
    Following documents can give you insight on this :
    1. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/PRIMER.PORTLET.PARAMETERS.EVENTS.HTML
    2. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/DESIGNING.PAGES.USING.PDKJAVA.SAMPLE.EVENT.WEB.PROVIDER.HTML
    -AMJAD.

  • Passing  null values to the attributes of a CAF operation

    Hi,
    In CAF I am trying to fetch data through Web Service. For this I need to pass null value for the attributes of the operation.If I set the value to null it gives me missing parameter as the error.
    Can anyone tell me how to pass null values to the attributes of a CAF operation?

    Hi Xavier,
    Declare the two variables of type if_wd_contex_node for e.g. lv_node and if_wd_context_element for e.g. lv_element. Now in the first one lets say lv_node get the refrence of dynamically created node like:
    lv_node = wd_context->get_child_node('<node name>').
    Then get the refrence of element like:
    lv_element = lv_node->get_element( ). (You can also pass index as parameter check the method API)
    then just set the value of attribute you want like:
    lv_element->set_attribute( exporting name = '<attribute name>' value = '<your value>').
    Regards,
    Neha

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • Issue with setting a default value to a Tabular Form field

    Hi -
    I'm running into an issue setting the default value of a tabular form column. I'm trying to set the default value to the row number (#rownum#). This used to work in previous versions, but now it's returning 0. Is there a was to set this value in the default value attribute of the field with a substitution string?
    Thank you in advance for help!

    Share with us what worked in previous versions.
    Jeff

  • Setting the cell width in a Tabular Form (SQL Query (updateable report) )

    version 3.2.1
    I have a Tabular Form (SQL Query (updateable report) ) and I have a column that is a VARCHAR2(4000) that when displayed extends the cell to the full length (which of course makes sense).
    How can I set the width of this cell to something like 30 or 50 and wrap the contents?
    Thanks,
    Joe

    Scott,
    Thank you for replying.
    Your suggestion kinda worked. I say kinda because when the report is first displayed the cell is the full width and appears to ignore the width setting. There is a Select List on the report to restrict some of the data that is displayed. When a selection is made from this Select List, it appears that the cell width is then adjusted to what was set, but not for every selection from this Select List.
    I made the width entry in Tabular Form Element - Element Width
    Any idea why the width setting is ignored?
    Thanks,
    Joe

  • Set a timeout for crystal sessions while using the Windows.Forms.Viewer?

    Hi,
    I am looking for a way to set the timeout for the crystal report sessions when using the Windows.Forms.Viewer in a .NET application. I guess that the default value is 20 minutes (like in the entperprise installations) but we cannot afford to keep many sessions open for that long. Is there a registry entry which can be set? Or even a way to do this programmatically?
    Thank you in advance,
    Stratos

    Hi David,
    we are talking here about a standalone .NET application where the reports are installed locally (like the application itself). We are not retrieving the reports from a server. The whole thing was developed using the crystal report viewer model probably because it was easier to do so. Is there a method in this model to tell the crystal runtime to do the clean-up work either for a report (like the ReportDocument.Close() ) or for the entire runtime instance. Dispose() does not seem to help us. If you say that there is no other way than redesign then we have to consider this option also.
    Cheers
    Stratos
    PS: What I was thinking of (as Plan B instead of using the ReportDocument object model) is to instantiate the crystal report viewer object in a separate process (.exe). Please note that we open a new crystal report viewer windows for each report, which is displayed. Closing the viewer window (ie. terminate the process) will at least then clean up and release the crystal DLLs and hopefully close the database connections. Or am I missing something here?
    Edited by: Efstratios Karaivazoglou on Jul 29, 2008 10:05 PM

Maybe you are looking for

  • T-Code for report generating Open Special GL Items

    Dear Experts, i wish to know a procedure or T-Code which would list Special GL Items of Vendors, which yet to get clear with Vendor Invoices and are still lying as Open Items in the Special GL. i have researched thru T-Code S_ALR_87012082 and it disp

  • Receiver File/FTP, SFTP, binary, endSeparator for CRLF ?

    We are planning an interface using the Receiver File/FTP Adapter, using SFTP in binary mode. The SAP PI runs on Unix, the other applications runs on Windows. Can NameA.endSeparator be used to ensure that every line in this file ends on CRLF? (As you

  • Airport Express and the audio output.

    I bought an Airport Express sometime last year, when it first came out. I don't have any of the packaging or the manual with me. What I would like to know is if Airport Express had support for both analog and optical audio output right from the start

  • LE-TRA : automatic determination of the route for MM module

    Hi guys, for the automatic determination of the route for MM module is it mandatory to fill the storage location? Thanks in advance, Dom.

  • Native Extension for iOS CoreBluetooth

    Hi All, I have been using Flash Builder for a while now to develop iOS prototype applications. Until now all integrated functions have served me very well, but I recently discovered the ability of iOS to cummunicate with Bluetooth Low Energy devices.