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

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

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

Similar Messages

  • Show/ Hide region based on button click

    Hi,
    I have two report regions. When I press generate report button then, one region has to be displayed.
    I have an item "select list with submit " and if select some value from the LOV in the select list then the second region has to be displayed. Over all only one region has to be displayed at a time.
    Thanks in advance.

    See this thread for a possible answer: Hide/Show Region With Javascript
    Thank you,
    Tony Miller
    Webster, TX

  • Dynamically show/hide regions out of the application workflow

    hi,
    is it possible to show/hide regions of a page dynamically with a "select list with submit" item?
    regards

    Hi,
    Do you mean "Conditionally display" items based on the value of a Select List with Submit?
    Andy

  • Javascript Help Needed to Show/Hide Regions

    version 4.0.2.00.07
    Hello,
    I'm hoping that someone would help me with creating a Javascript function to Show/Hide regions.
    I have a Select List defined as Checkboxes that when clicked I would like to show specific regions that contain fields that are specific to that checkbox selection. There are currently four selections available. There are two selections that would show one region and the other two selections would show the other region.
    Please let me know if I need to clarify anything.
    Thanks,
    Joe

    There is an out-of-box solution that may help you - check out the "Customisation" section in the region properties.
    Otherwise, you might like to explore using a Dynamic Action to show/hide your region based on an event on your relevant checkbox.
    Either way, you should have a declarative solution when you thought you might need to hand-code some javaScript :-)
    ps - thanks for providing your Apex version.

  • APEX 4.1 show hide fields based on value of checkbox/radio

    I am trying to successfully hide and show fields based on the value of a clicked checkbox.  I am using a dynamic action, but it isn't working. 
    I followed the sample at Does Oracle Apex 4 enable the following AJAX features? (ie without the dev writing the Javascript) - Stack Overflow
    I even tried a radio button, but it didn't work.  I cannot uncheck the radio button.  What am I doing wrong?  Thank you for any help you can provide.

    Hi,
         create a dynamic action for page load to hide the item which you wanna hide
         now create another dynamic action
         event : Click
         Selection Type : Items
         Items : P1_Check_box(name of the check box item)
         condition : equal to
         value : return value of the check box item (if you click the check box and the return value is 1 then just add 1)
         in true actions
         Action : Show
        Selection Type : Items
         Items : P1_Text_field(name of the field)
         uncheck fire on page load
         create exact opposite false action, that's it.
    Regards,
    Mohan.

  • Show / hide field based on text in another field

    Hi,
    I'm trying to make one of my fields reactive to what is the text generated in another field.
    At the moment I have this under calculate using custom javascript:
    var Mask = this.getField("Course").value;
    if(Mask == 'Swimming') this.getField("Code").display = display.visible;
    else this.getField("Code").display = display.hidden;
    Whereas Course is the field that is changing and Code is the one that will show/hide based on content of Course.
    Any help?

    Hi Everyone,
    After doing trials with simple calculations it still wasn't working and so I've figured out what the problem is - the document was being exported but with the data being pre-populated from an SQL database in which during the export it all happens at once, not a chain effect so when the export happens it was filling "Code" before "Course" had any info in it...
    The fix was basically having to create a different field in the SQL source itself for an independent field on the pdf form.

  • How to show/hide total based on selected column in column selector

    Hello,
    Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
    Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
    Default:
    Count
    East 10
    West 20
    Total 30
    Gender:
    Male Female Total
    Count Count Count
    East 6 4 10
    West 14 6 20
    Total 20 10 30
    Any thoughts?
    Thanks!

    I recommend using view selector instead of column selector

  • Show/Hide Fields Based on Dropdown

    Hi,
    I am attempting to show/hide subforms with a dropdown selection. I've found a lot of information on the subject, and have ended up with this as my script:
    form1.Page1.Division::exit - (JavaScript, client)
    switch (Page1.Division.rawValue)
       case "1":
       SubformZZI.presence = "visible";
       SubformZZR.presence = "hidden";  
          break;
       case "2":
       SubformZZI.presence = "hidden";
       SubformZZR.presence = "visible";      
          break;
    However, it is not doing anything when a selection is made in the dropdown box. I have the "SubformZZI" initially set as "Visible" and the "SubformZZR" initially set as "Hidden".
    Any suggestions?
    Regards,
    ZeroZone

    You have wrongly referenced the fields in your code.
    Copy and paste the below code in the click event of the Submit button. It should work as expected.
    The code thathas error is commented..
    // First check if there are null values, then construct email using script
    var vEmail = "";
    var vSubject = "";
    var vBody = "Attached to this email is a Field Service Issue - Parts Order Form for Job #" + Page1.JobNumber.rawValue + ".";
    var vName = "";
    var vCC =  "[email protected]" + "," + Page1.RSM.rawValue + "," + Page1.IssueLeaderEmail.rawValue; 
    var vFormat = "PDF";
    var errorMessage = "At least one required field was empty. Please fill in the required fields (highlighted) before continuing.";
    // Check required fields and build error message
    if (Page1.IssueLeaderEmail.rawValue == null)
    errorMessage = errorMessage;
    else
    vSubject = "Field Service Issue - Parts Order Form for Job #" + Page1.JobNumber.rawValue;
    // Check Division field
    if (Page1.Division.rawValue == "Case Division")
         //vEmail = Page1.SendFormToZZI.rawValue;
         vEmail = Page1.SubformZZI.SendFormToZZI.rawValue;
         //vCC = Page1.SendCopyToZZI.rawValue + "," + Page1.CSTZZI.rawValue;
         vCC = Page1.SubformZZI.SendCopyToZZI.rawValue + "," + Page1.SubformZZI.CSTZZI.rawValue;
    else
         //vEmail = Page1.SendFormToZZR.rawValue;
         vEmail = Page1.SubformZZR.SendFormToZZR.rawValue;
         //vCC = Page1.SendCopyToZZR.rawValue + "," + Page1.CSTZZR.rawValue;
         vCC = Page1.SubformZZR.SendCopyToZZR.rawValue + "," + Page1.SubformZZR.CSTZZR.rawValue;
    // If fields required for script are null, warn user and do not initiate email
    if (Page1.IssueLeaderEmail.rawValue == null)
    xfa.host.messageBox(errorMessage, "Sending an email", 0, 0); // Send out a custom error message if any of these fields are null
    else
    // Everything is OK, send email
    event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody + "&cc=" + vCC,cSubmitAs:"PDF",cCharset:"utf-8"});
    Thanks
    Srini

  • How to hide /show any attribute based on LOV ?

    i have a pages which have three attribute .which are following -
    1-one is LOV
    2-input text
    3-also input text
    if i select some value from LOV i want to hide one input text .how does i achieve this
    thanks
    Edited by: ADFORCLE on Jul 12, 2011 9:09 AM

    if your Jdeveloper version is not 11.1.2, check this
    http://www.oracle.com/technetwork/developer-tools/jdev/listbindingvalue-088449.html
    >
    In JDeveloper 11.1.1.x, an expression like #{bindings.JobId.inputValue} would return the internal list index number when JobId was a list binding. To get the actual JobId attribute value, you needed to use #{bindings.JobId.attributeValue}. In JDeveloper 11.1.2 this is no longer needed, the #{bindings.JobId.inputValue} expression will return the attribute value corresponding with the selected index in the choice list.
    >
    Edited by: M.Jabr on Jul 11, 2011 9:05 AM

  • Dynamic query table for report based on LOV selected

    Hi,
    Need some suggestion and guidance how to dynamically query table via lov for report .
    Scenario:
    Table, TABLE_LIST, has tablename (table in DB) and filter (for where clause) column. The TABLENAME_LOVE is derived from table TABLE_LIST.
    SELECT TABLENAME D, TABLENAME R FROM TABLE_LIST
    In Page 2,a page select list item,P2_TABLENAME to use TABLENAME_LOV
    All data in tables in the table_list have identical structure (columns, triggers, primary key, and so on).
    I want to have the report region query from the table based on selected LOV.
    Example,
    Tablename Filter
    TB1
    CD2 ACTIVE='Y'
    When select TB1, the report regin will query based on TB1.
    When select CD2, the report regin will query based on CD2 WHERE ACTIVE='Y'
    Question:
    How can I query based on &P2_TABLENAME. WHERE &P2_FILTER.
    Like
    select col1, col2 from &P2_TABLENAME WHERE &P2FILTER
    Greatly appreciate any suggestion and some guidance.
    Tigerwapa

    Hi,
    You should always post your Apex version, DB version and other information as suggested in the FAQ.
    And the moment you talk report you should state whether it is IR or Classic.
    As for your query, have you explored the Report type "SQL Query (PL/SQL function body returning SQL query)" ?
    That might be a good fit for what you are trying to achieve.
    Regards,

  • Show/hide buttons based on templates

    Hi
    1. Is there anyway for hide/show a button (button style template based button) dynamically?
    2. If the button is an image (button style Image) Is there anyway for hide/show a button dynamically?
    Thanks!

    Hello:
    I'll assume that you want to hide/show a button using javascript.
    Generally, if the button template has the '#BUTTON_ATTRIBUTES#' substitution sting defined you can specify an 'id' attribute for the button in the Button Attributes field of the button definition. For an image based button you specify and 'id' in the Image Attributes field. You can then show or hide these buttons using the
    $x_HideItemRow("<button_id>") and $x_ShowItemRow("<button_id>") built in javascript functions.

  • Show/Hide fields based on choices in drop down menu

    I need help with a script that I cobbled together from an example script; I'm not good enough at java to edit it for my needs.
    I have a form where I would like different drop down fields would be visible/hidden depending on the choices made from other drop down menus.
    If (for example) they select paper type "white" or "color" then "white" will result in a second menu of paper choices, the "color" selection result in them picking the paper wieght, then from there the color.
    My problem stems from the fact that my form is very linited in space, so I would like some of these fields to be essentially on top of each other; visibility dependant on previous choices. I can get to Menu 1 (select paper color) and then Menu 2 if they select white. But there's a problem with setting up a third menu in this series, if they select "color" from Menu 1, then I try to have a drop down for paper weight, all the fields except for Menu 1 are hidden. Playing with the script let me have them all visible, but again, I'm limited on space and can't really spread them out.
    I know I'm missing one small command... somewhere.
    Here is the script I'm working with:
    function control_section_fields() {
        if (event.willCommit) return;
        // Get the value selected in the combo box
        var section = event.changeEx;
       // Hide all of the entry fields
        getField("sec").display = display.hidden;
        // Reset all of the entry fields
        resetForm(["sec"]);
        // Display the fields for the selected section
        getField("sec." + section).display = display.visible;
    where the drop down fields are named "sec.a.dd" for example, and the Export value of different values are assigned as "a", "b", etc.
    Sorry for the rambling. Any help will be greatly appreciated.

    also, if "==" could be roughly translated to "is", "!=" would mean "is not".
    JavaScript is Case sensitive so make sure you did not name your field STATE#1 instead.  It's a pretty common error.  Try not to use special characters when naming fields.  Stick to standards.  I personnally always name fields with capital letters and numbers using identation like
    MYFORM.PLACE.NUMBER
    MYFORM.PLACE.ADDRESS
    MYFORM.SEX.MALE
    MYFORM.SEX.FEMALE
    This is really useful if you have lots of fields related to one another.  You can then apply methods to entire groups of fields in one simple line of code.
    For example this.getField("MYFORM").display = display.hidden would hide all four fields.  It works kind of the same way as folders unside your computer.
    Finally, "#" is generally used as widget identification.  I think this is what happened.  If you copy a field, it retains the same name and some of its charateristics but acrobat will assign them a number called widget.  The original field State will get the identification State#0 in the right pane as it is 0-based.  The copie will be identified State#1.  You must understand that the name of the field is still "State".  Some methods (actions you can code) let you determine the widget number for targetting a specific field from those you copied.  It is not the case here.  So for disambiguation, you should name your fields different name like STATE1 and STATE2, or STATE.1 and STATE.2 if you plan to use what I wrote about earlier.

  • Show/Hide Regions using list (Button List Template)

    Hi,
    I have a page on which i'm using list (Button list - Template). Below lists, I have multiple form regions. When a user opens that page, all regions should be visible and the focus should be on 'Show All' list. However, Region 'Terms' should only be visible when list 'Terms' is selected. The same functionality should apply to other regions and lists. I have seen that Oracle has used a similar functionality when an Item on a page is clicked or opened.
    Does anybody know how to do it?

    I'm trying to use the hide/show region in the posting to hide a button region when I click the button.
    When I click my button it calls SubmitCmd(sCmd) and hits the alert popup "Here we go!" but then all the AJAX inserts happen and THEN the region hides.
    I guess the alert is Async and the $x_Hide(l_Item); is not or something like that??
    How can I hide the region and then process the rest with the same button click?
    Or how can I hide just a normal button when I click it.. same thing though, need to do it before processing of AJAX inserts.
    function SubmitCmd(sCmd){
    var lQuesID;
    var elmName;
    var elm;
    lcontinue = true;
    showMessage('');
    alert('Here we go!');
    $x_Hide(l_Item);
    var lAdtUseID =html_GetElement('P3_AUDIT_USE_ID').value;
    etc.. a bunch of AJAX inserts, etc..

  • How to show/hide div based on mysql value

    I have a dataset that has a column 'locked' that is a boolean that I want to use to remove a button on a form.  The idea being that it will be set to 1 after a period of time thus removing the buttun that links to an update form and preventing the data from being changed.  Currently, I have the field linked to a check box at the top of the table.  How do I use this to hide the button (or any other html element for that matter) when set to 1 and show the element when set to 0?  I understand I need to creat a php variable from the mysql boolean and then use a if/else loop to hide/display the html but I don't know how to impliment this?  Thanks for any help offered.
    Here's the code:
    <?php require_once('Connections/testmypms.php'); ?>
    <?php
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_spec_rx = 10;
    $pageNum_spec_rx = 0;
    if (isset($_GET['pageNum_spec_rx'])) {
      $pageNum_spec_rx = $_GET['pageNum_spec_rx'];
    $startRow_spec_rx = $pageNum_spec_rx * $maxRows_spec_rx;
    $colname_spec_rx = "1";
    if (isset($_GET['pxID'])) {
      $colname_spec_rx = (get_magic_quotes_gpc()) ? $_GET['pxID'] : addslashes($_GET['pxID']);
    mysql_select_db($database_testmypms, $testmypms);
    $query_spec_rx = sprintf("SELECT spec_rx.spec_rx_id, spec_rx.FK_px_id, DATE_FORMAT(spec_rx.spec_rx_date, '%%d-%%m-%%Y') as formatted_rx_date, spec_rx.FK_user_id, spec_rx.spec_rx_rsph, spec_rx.spec_rx_rcyl, spec_rx.spec_rx_raxis, spec_rx.spec_rx_rhprism, spec_rx.spec_rx_rhprismbase, spec_rx.spec_rx_rvprism, spec_rx.spec_rx_rvprismbase, spec_rx.spec_rx_rnadd, spec_rx.spec_rx_rnhprism, spec_rx.spec_rx_rnhprismbase, spec_rx.spec_rx_rnvprism, spec_rx.spec_rx_rnvprismbase, spec_rx.spec_rx_rintadd, spec_rx.spec_rx_rinthprism, spec_rx.spec_rx_rinthprismbase, spec_rx.spec_rx_rintvprism, spec_rx.spec_rx_rintvprismbase, spec_rx.spec_rx_lsph, spec_rx.spec_rx_lcyl, spec_rx.spec_rx_laxis, spec_rx.spec_rx_lhprism, spec_rx.spec_rx_lhprismbase, spec_rx.spec_rx_lvprism, spec_rx.spec_rx_lvprismbase, spec_rx.spec_rx_lintadd, spec_rx.spec_rx_linthprism, spec_rx.spec_rx_linthprismbase, spec_rx.spec_rx_lintvprism, spec_rx.spec_rx_lintvprismbase, spec_rx.spec_rx_lnadd, spec_rx.spec_rx_lnhprism, spec_rx.spec_rx_lnhprismbase, spec_rx.spec_rx_lnvprism, spec_rx.spec_rx_lnvprismbase, spec_rx.locked, users.user_id, users.user_firstname, users.user_surname FROM spec_rx, users WHERE %s = spec_rx.FK_px_id AND spec_rx.FK_user_id = users.user_id ORDER BY spec_rx.spec_rx_date DESC, spec_rx.spec_rx_id DESC", $colname_spec_rx);
    $query_limit_spec_rx = sprintf("%s LIMIT %d, %d", $query_spec_rx, $startRow_spec_rx, $maxRows_spec_rx);
    $spec_rx = mysql_query($query_limit_spec_rx, $testmypms) or die(mysql_error());
    $row_spec_rx = mysql_fetch_assoc($spec_rx);
    if (isset($_GET['totalRows_spec_rx'])) {
      $totalRows_spec_rx = $_GET['totalRows_spec_rx'];
    } else {
      $all_spec_rx = mysql_query($query_spec_rx);
      $totalRows_spec_rx = mysql_num_rows($all_spec_rx);
    $totalPages_spec_rx = ceil($totalRows_spec_rx/$maxRows_spec_rx)-1;
    $colname_demographics = "1";
    if (isset($_GET['pxID'])) {
      $colname_demographics = (get_magic_quotes_gpc()) ? $_GET['pxID'] : addslashes($_GET['pxID']);
    mysql_select_db($database_testmypms, $testmypms);
    $query_demographics = sprintf("SELECT demographics.px_id, demographics.FK_title_id, demographics.firstname, demographics.surname, DATE_FORMAT(demographics.dob, '%%d-%%m-%%Y') as formatted_dob, title.title_id, title.title FROM demographics, title WHERE %s = demographics.px_id AND demographics.FK_title_id = title.title_id", $colname_demographics);
    $demographics = mysql_query($query_demographics, $testmypms) or die(mysql_error());
    $row_demographics = mysql_fetch_assoc($demographics);
    $totalRows_demographics = mysql_num_rows($demographics);
    $queryString_spec_rx = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_spec_rx") == false &&
            stristr($param, "totalRows_spec_rx") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_spec_rx = "&" . htmlentities(implode("&", $newParams));
    $queryString_spec_rx = sprintf("&totalRows_spec_rx=%d%s", $totalRows_spec_rx, $queryString_spec_rx);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Spec Rx3</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    //-->
    </script>
    </head>
    <body>
    <p>Spec Rx</p>
    <p><?php echo $row_demographics['px_id']; ?></p>
    <p><?php echo $row_demographics['title']; ?> <?php echo $row_demographics['firstname']; ?> <?php echo $row_demographics['surname']; ?> <?php echo $row_demographics['formatted_dob']; ?> </p>
    <p>
      <input name="Add_spec_rx" type="button" id="Add_spec_rx" onClick="MM_goToURL('parent','add_spec_rx.php');return document.MM_returnValue" value="New Rx">
    </p>
    <p> <a href="<?php printf("%s?pageNum_spec_rx=%d%s", $currentPage, max(0, $pageNum_spec_rx - 1), $queryString_spec_rx); ?>">Previous</a> <a href="<?php printf("%s?pageNum_spec_rx=%d%s", $currentPage, min($totalPages_spec_rx, $pageNum_spec_rx + 1), $queryString_spec_rx); ?>">Next</a></p>
    <?php do { ?>
    <table border="1" cellspacing="1" cellpadding="5">
      <tr>
        <td> </td>
        <td><?php echo $row_spec_rx['formatted_rx_date']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_id']; ?></td>
        <td>locked:
        <input <?php if (!(strcmp($row_spec_rx['locked'],1))) {echo "checked";} ?> name="locked" type="checkbox" id="locked" value="1"></td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td>Sph</td>
        <td>Cyl</td>
        <td>Axis</td>
        <td>HPrism</td>
        <td>HPrismBase</td>
        <td>VPrism</td>
        <td>VPrismBase</td>
        <td>NrAdd</td>
        <td>NrHPrism </td>
        <td>NrHPrismBase</td>
        <td>NrVPrism</td>
        <td>NrVPrismBase</td>
        <td>IntAdd</td>
        <td>IntHPrism</td>
        <td>IntHPrismBase</td>
        <td>IntVPrism</td>
        <td>IntVPrismBase</td>
      </tr>
      <tr>
        <td>R</td>
        <td><?php echo ($row_spec_rx['spec_rx_rsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rsph']) : null; ?></td>
        <td><?php echo ($row_spec_rx['spec_rx_rcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rcyl']) : null; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_raxis']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rinthprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rinthprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintvprismbase']; ?></td>
      </tr>
      <tr>
        <td>L</td>
        <td><?php echo ($row_spec_rx['spec_rx_lsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lsph']) : null; ?></td>
        <td><?php echo ($row_spec_rx['spec_rx_lcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lcyl']) : null; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_laxis']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_linthprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_linthprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintvprismbase']; ?></td>
      </tr>
      <tr>
        <td> </td>
        <td>User ID <?php echo $row_spec_rx['user_id']; ?></td>
        <td><?php echo $row_spec_rx['user_firstname']; ?></td>
        <td><?php echo $row_spec_rx['user_surname']; ?></td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
    </table>
    <p> </p>
    <?php } while ($row_spec_rx = mysql_fetch_assoc($spec_rx)); ?>
    <p> </p>
    <p> </p>
    <p> </p>
    </body>
    </html>
    <?php
    mysql_free_result($spec_rx);
    mysql_free_result($demographics);
    ?>

    Thanks for your help, nearly worked but only returned results where the if statement was met ie where locked =0, so I used an additional statement to display something else when when locked=1
    <?php
    if($row_spec_rx['locked'] == 1) {
    echo "button html goes here";
    ?>
    <?php
    if($row_spec_rx['locked'] == 0) {
    echo "something else";
    ?>
    I am sure there must be a more elegant way of doing this!

  • Conditionally Hide Regions based on :APP_USER

    Hey Guys,
    I have a pretty straight-forward question. I'm trying to hide a region unless the user = "ADMIN_JOHN" OR "ADMIN_TOM". Can someone please tell me: 1.) the condition type, 2.) what to write into expression 1 (and possibly expression 2).
    I've tried a ton of things, I must just be getting using the wrong syntax.
    Example:
    Condition type: Value of Item in Expression 1 = Expression 2
    Expression 1:   :APP_USER
    Expression 2:   "ADMIN_TOM" or "ADMIN_JOHN"Thanks a lot,
    Mauricio

    Hello Mauricio,
    Try this:
    Condition type: Value of Item in Expression 1 is Contained within Colon Delimted List
    Expression 1: APP_USER
    Expression 2: ADMIN_TOM:ADMIN_JOHN
    Greetings,
    Roel
    http://roelhartman.blogspot.com/

Maybe you are looking for