PHP show region if DB column content = no

That's all I want to be able to do. If a record in my DB has a column that matches no, then I need to show a region with warning text in it, but I can't work it out.
Can somebody help me with the code please?
With asp there was a plug in from a chap called Rob GT and it enable us to say: 'if field A meets this criteria, then show/hide this'. Currently DW only shows/hides a record if the whole recordset is empty. Is there any kind of plugin for php available that would enable this functionality?
Thank you in advance.
Mat

<?php if ($recordset_row['table_field'] == "no") { ?>
error message
<?php } else { ?>
everything is fine
<?php } ?>

Similar Messages

  • Hide/Show the column content

    Hi Guys,
    Is it possible to show /hide the column contents on particular conditions for a dataTable??
    In other words, there may be a situation where I wanted to hide the object for row1 but not for row2
    I tried with setRendered method. But the problem I am facing is for all row values the last condition is applying
    Please let me know the answer at earliest. Otherwise any alternate solution is also OK
    Thanks
    Sudhakar

    Hi JIM,
    Thanks for reply.
    Yesterday only I got the answer. Thought to post my idea here but got delayed.
    After posting this question, I did some investigation on how dataTable component works.
    Instead of using DefaultDataTableModel i have binded my own bean array which has pre computed values.
    Now it is working fine
    Thanks & Best Regards
    Sudhakar Chavali

  • Hide and Show Region Problem

    Hi,
    I have created a report with the following attributes:
    Region Definition User Interface - Hide and Show Region;
    Report template -Standard;
    Sort Columns - all checked.
    Report source - SQL Query (PL/SQL Function Body returning SQL query).
    I open a page with this report, click on (+) and show region but when I try to sort records in the column region hides. The same problem I have with some others report templates.
    Report templates Borderless and Horizontal Border do not have this problem.
    I am using Application Express 2.2.1.00.04.
    Could someone explain what it is?
    Thank you in advance.
    Val

    Report template -Standard
    Use a "Standard - PPR" template instead, that works better with a Show/Hide region template because the entire page is not re-rendered when you click on a column header to sort. Only the report region content is refreshed.

  • Show region if empty not working (ASP)

    I have created an app in ASP (not .NET) to record some supplier stock info, with a summary page displaying a filtered recordset based upon the logged in user which is working fine and dandy... the problem lies when no records exist for the current user the summary page is coming back with the standard ASP, ADO error meaning no records exist: -
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    So I have tried adding "show region" behaviors to show a "no records exist" message and hiding the table containing the summary info, but the above error is still showing when I would only expect the "no records exist" message to display... page code as follows, all help appreciated..!
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    ' *** Logout the current user.
    MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
    If (CStr(Request("MM_Logoutnow")) = "1") Then
      Session.Contents.Remove("MM_Username")
      Session.Contents.Remove("MM_UserAuthorization")
      MM_logoutRedirectPage = "index.asp"
      ' redirect with URL parameters (remove the "MM_Logoutnow" query param).
      if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
      If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
        MM_newQS = "?"
        For Each Item In Request.QueryString
          If (Item <> "MM_Logoutnow") Then
            If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
            MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
          End If
        Next
        if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
      End If
      Response.Redirect(MM_logoutRedirectPage)
    End If
    %>
    <!--#include file="Connections/StockLevels.asp" -->
    <%
    ' *** Restrict Access To Page: Grant or deny access to this page
    MM_authorizedUsers=""
    MM_authFailedURL="index.asp"
    MM_grantAccess=false
    If Session("MM_Username") <> "" Then
      If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
             (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
        MM_grantAccess = true
      End If
    End If
    If Not MM_grantAccess Then
      MM_qsChar = "?"
      If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
      MM_referrer = Request.ServerVariables("URL")
      if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
      MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
      Response.Redirect(MM_authFailedURL)
    End If
    %>
    <%
    if Session("MM_Username")="" then
    Response.Redirect("index.asp")
    end if
    %>
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "1"
    If (Session("MM_Username") <> "") Then
      Recordset1__MMColParam = Session("MM_Username")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_StockLevels_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM AULWEB.TESTP12 WHERE SNAM12 = ? ORDER BY VNDR12 ASC"
    Recordset1_cmd.Prepared = true
    Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 15, Recordset1__MMColParam) ' adVarChar
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = 10
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim Recordset1_total
    Dim Recordset1_first
    Dim Recordset1_last
    ' set the record count
    Recordset1_total = Recordset1.RecordCount
    ' set the number of rows displayed on this page
    If (Recordset1_numRows < 0) Then
      Recordset1_numRows = Recordset1_total
    Elseif (Recordset1_numRows = 0) Then
      Recordset1_numRows = 1
    End If
    ' set the first and last displayed record
    Recordset1_first = 1
    Recordset1_last  = Recordset1_first + Recordset1_numRows - 1
    ' if we have the correct record count, check the other stats
    If (Recordset1_total <> -1) Then
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
      If (Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
    End If
    %>
    <%
    ' *** Recordset Stats: if we don't know the record count, manually count them
    If (Recordset1_total = -1) Then
      ' count the total records by iterating through the recordset
      Recordset1_total=0
      While (Not Recordset1.EOF)
        Recordset1_total = Recordset1_total + 1
        Recordset1.MoveNext
      Wend
      ' reset the cursor to the beginning
      If (Recordset1.CursorType > 0) Then
        Recordset1.MoveFirst
      Else
        Recordset1.Requery
      End If
      ' set the number of rows displayed on this page
      If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
      ' set the first and last displayed record
      Recordset1_first = 1
      Recordset1_last = Recordset1_first + Recordset1_numRows - 1
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
    End If
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Move To Record and Go To Record: declare variables
    Dim MM_rs
    Dim MM_rsCount
    Dim MM_size
    Dim MM_uniqueCol
    Dim MM_offset
    Dim MM_atTotal
    Dim MM_paramIsDefined
    Dim MM_param
    Dim MM_index
    Set MM_rs    = Recordset1
    MM_rsCount   = Recordset1_total
    MM_size      = Recordset1_numRows
    MM_uniqueCol = ""
    MM_paramName = ""
    MM_offset = 0
    MM_atTotal = false
    MM_paramIsDefined = false
    If (MM_paramName <> "") Then
      MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
    End If
    %>
    <%
    ' *** Move To Record: handle 'index' or 'offset' parameter
    if (Not MM_paramIsDefined And MM_rsCount <> 0) then
      ' use index parameter if defined, otherwise use offset parameter
      MM_param = Request.QueryString("index")
      If (MM_param = "") Then
        MM_param = Request.QueryString("offset")
      End If
      If (MM_param <> "") Then
        MM_offset = Int(MM_param)
      End If
      ' if we have a record count, check if we are past the end of the recordset
      If (MM_rsCount <> -1) Then
        If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
          If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
            MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
          Else
            MM_offset = MM_rsCount - MM_size
          End If
        End If
      End If
      ' move the cursor to the selected record
      MM_index = 0
      While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
      If (MM_rs.EOF) Then
        MM_offset = MM_index  ' set MM_offset to the last possible record
      End If
    End If
    %>
    <%
    ' *** Move To Record: if we dont know the record count, check the display range
    If (MM_rsCount = -1) Then
      ' walk to the end of the display range for this page
      MM_index = MM_offset
      While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
      ' if we walked off the end of the recordset, set MM_rsCount and MM_size
      If (MM_rs.EOF) Then
        MM_rsCount = MM_index
        If (MM_size < 0 Or MM_size > MM_rsCount) Then
          MM_size = MM_rsCount
        End If
      End If
      ' if we walked off the end, set the offset based on page size
      If (MM_rs.EOF And Not MM_paramIsDefined) Then
        If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
          If ((MM_rsCount Mod MM_size) > 0) Then
            MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
          Else
            MM_offset = MM_rsCount - MM_size
          End If
        End If
      End If
      ' reset the cursor to the beginning
      If (MM_rs.CursorType > 0) Then
        MM_rs.MoveFirst
      Else
        MM_rs.Requery
      End If
      ' move the cursor to the selected record
      MM_index = 0
      While (Not MM_rs.EOF And MM_index < MM_offset)
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
    End If
    %>
    <%
    ' *** Move To Record: update recordset stats
    ' set the first and last displayed record
    Recordset1_first = MM_offset + 1
    Recordset1_last  = MM_offset + MM_size
    If (MM_rsCount <> -1) Then
      If (Recordset1_first > MM_rsCount) Then
        Recordset1_first = MM_rsCount
      End If
      If (Recordset1_last > MM_rsCount) Then
        Recordset1_last = MM_rsCount
      End If
    End If
    ' set the boolean used by hide region to check if we are on the last record
    MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth
    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem
    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
      MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If
    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""
    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
      End If
    Next
    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
      End If
    Next
    ' create the Form + URL string and remove the intial '&' from each of the strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
      MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "")  Then
      MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
      MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If
    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
      If (firstItem <> "") Then
        MM_joinChar = "&"
      Else
        MM_joinChar = ""
      End If
    End Function
    %>
    <%
    ' *** Move To Record: set the strings for the first, last, next, and previous links
    Dim MM_keepMove
    Dim MM_moveParam
    Dim MM_moveFirst
    Dim MM_moveLast
    Dim MM_moveNext
    Dim MM_movePrev
    Dim MM_urlStr
    Dim MM_paramList
    Dim MM_paramIndex
    Dim MM_nextParam
    MM_keepMove = MM_keepBoth
    MM_moveParam = "index"
    ' if the page has a repeated region, remove 'offset' from the maintained parameters
    If (MM_size > 1) Then
      MM_moveParam = "offset"
      If (MM_keepMove <> "") Then
        MM_paramList = Split(MM_keepMove, "&")
        MM_keepMove = ""
        For MM_paramIndex = 0 To UBound(MM_paramList)
          MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
          If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
            MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
          End If
        Next
        If (MM_keepMove <> "") Then
          MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
        End If
      End If
    End If
    ' set the strings for the move to links
    If (MM_keepMove <> "") Then
      MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
    End If
    MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
    MM_moveFirst = MM_urlStr & "0"
    MM_moveLast  = MM_urlStr & "-1"
    MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
    If (MM_offset - MM_size < 0) Then
      MM_movePrev = MM_urlStr & "0"
    Else
      MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
    End If
    %>
    <% Session ("accountname") = Recordset1.Fields.Item("SNAM12").Value%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>S2N part stock summary</title>
    <link href="Style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="352"><img src="Assets/invertednifco.jpg" alt="Nifco logo" width="199" height="55" longdesc="http://www.nifcoeu.com" /></td>
        <td width="34%"> </td>
        <td width="352" align="right" valign="top" class="style23"><p>Logged in as:
          <%Response.Write(Session("MM_Username"))%>
                <br />
            <a href="<%= MM_Logout %>">Logout</a></p></td>
      </tr>
      <tr>
        <td width="352" valign="bottom"><img src="Assets/horizontal_grey_line.jpg" alt="grey line" width="352" height="5" /></td>
        <td> </td>
        <td width="352"> </td>
      </tr>
      <tr>
        <td width="352" class="style4"><span class="nifco_banner_txt">NI</span><span class="style21"><span class="nifcoF">f</span></span><span class="nifco_banner_txt">CO UK LIMITED</span></td>
        <td> </td>
        <td width="352"> </td>
      </tr>
      <tr>
        <td width="352" height="52" class="style4"> </td>
        <td> </td>
        <td width="352"> </td>
      </tr>
      <tr>
        <td colspan="3" align="center" valign="middle"><table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
          <tr>
            <td><div align="center">
              <h5 align="center">Your part number</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Nifco part number</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Part description</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Actual stock</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Stock on Order</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Stock in Transit</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">UOM</h5>
            </div></td>
            <td><div>
              <h5 align="center">Nifco specific part</h5>
            </div></td>
            <td><h5> </h5></td>
            <td> </td>
          </tr>
          <%
    Dim RecordCounter
    RecordCounter = 0
    %>
          <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
              <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
                <tr bgcolor=
              "<%
        RecordCounter = RecordCounter + 1
        If RecordCounter Mod 2 = 1 Then
          Response.Write "#999999"
         End If
        %>"
            >
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("VNDR12").Value)%> </p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("PNUM12").Value)%> </p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("PDES12").Value)%></p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("ASTK12").Value)%> </p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("OSTK12").Value)%></p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("ISTK12").Value)%></p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("UOFM12").Value)%></p>
                  </div></td>
                  <td width="26"><div align="center"><%=(Recordset1.Fields.Item("NIFC12").Value)%></div></td>
                  <td width="26"><p><a href="update.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "VNDR12=" & Recordset1.Fields.Item("VNDR12").Value %>">Edit</a></p></td>
                  <td width="45"><p align="center"><a href="delete.asp?VNDR12=<%=(Recordset1.Fields.Item("VNDR12").Value)%>">Delete</a></p></td>
                </tr>
                <% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
              <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Recordset1.MoveNext()
    Wend
    %>
        </table>
            <p> </p></td>
      </tr>
      <tr>
        <td width="352"> </td>
        <td><div align="center">
          <table border="0">
              <tr>
                <td><% If MM_offset <> 0 Then %>
                    <a href="<%=MM_moveFirst%>">First</a>
                    <% End If ' end MM_offset <> 0 %>            </td>
                <td><% If MM_offset <> 0 Then %>
                    <a href="<%=MM_movePrev%>">Previous</a>
                    <% End If ' end MM_offset <> 0 %>            </td>
                <td><% If Not MM_atTotal Then %>
                    <a href="<%=MM_moveNext%>">Next</a>
                    <% End If ' end Not MM_atTotal %>            </td>
                <td><% If Not MM_atTotal Then %>
                    <a href="<%=MM_moveLast%>">Last</a>
                    <% End If ' end Not MM_atTotal %>            </td>
              </tr>
              </table>
        </div>      <p align="center">      Records <%=(Recordset1_first)%> to <%=(Recordset1_last)%> of <%=(Recordset1_total)%></p></td>
        <td width="352" height="52" align="right" valign="bottom"> </td>
      </tr>
      <tr>
        <td width="352" align="center"><a href="newpart.asp">Register a new part</a></td>
        <td><% If Recordset1.EOF And Recordset1.BOF Then %>
            <div align="center">
              <h5>I'm sorry, no records found.<br />
                <input type="button" name="btnCancel" value="Go back!" onclick="history.back()"/>
                    </h5>
            </div>
            <% End If ' end Recordset1.EOF And Recordset1.BOF %></td>
        <td width="352" align="right" valign="bottom"><img src="Assets/horizontal_grey_line.jpg" alt="grey line" width="353" height="5" /></td>
      </tr>
      <tr>
        <td width="352"> </td>
        <td> </td>
        <td width="352"><div align="left"><span class="nifco_banner_txt">NI</span><span class="nifcoF">f</span><span class="style21"><span class="nifco_banner_txt">CO UK LIMITED</span></span></div></td>
      </tr>
      <tr>
        <td colspan="3"><div align="center" class="p_text">Nifco Supplier Stock Management System</div></td>
      </tr>
    </table>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

    It depends on the markup situation, for example if your
    images are *not* wrapped in a container element that contains just
    the image, then I would do something like this:
    <img spry:if="'{boximage}' != '' &amp;&amp;
    '{boximage}' != 'undefined'" src="{boximage}" />
    <img spry:if="'{boximage}' == '' || '{boximage}' ==
    'undefined'" src="MissingImage.jpg" />
    Or in the case of the products demo where we have an image in
    a <p> I would use a spry:choose:
    <p spry:choose="choose">
    <img spry:when="'{boximage}' != '' &amp;&amp;
    '{boximage}' != 'undefined'" src="{boximage}" />
    <img spry:default="default" src="MissingImage.jpg" />
    </p>
    Using spry:choose where you can is better because it means
    the region processing code has one less conditional expression to
    evaluate since the default case has no expression associated with
    it.
    --== Kin ==--

  • Error while trying to search in advanced table with hide/show region

    Hi
    I have search region and a results table with a hide.show in it.I did a search initially and got the results.I clicked on the hide/show region to see the details.
    I put another search criteria in the search region and tried to do a search.
    I am getting the following error
    The search cannot be executed because the table has pending changes that would be lost...
    Can anybody help me on this please....
    Message was edited by:
    user580745

    Any setter/getter method being used on hide/show action? How are you enabling the details? Is there a transient column in your VO?
    --Shiv                                                                                                                                                                                                                                                                                       

  • Hide / Show region template - how to make it stay visible after NEXT& PREV?

    Hello,
    I am using the Hide / Show region template (by the way great idea to create this template ;)
    By default the region is hidden. If i want to see the region content (it is a report) I click on that icon and it becomes visible. For my report I use the pagination "ROW Ranges X to Y of Z (with pagination)".
    The issue is that if I click NEXT of Previous, the region is closing (hidding).. and in order to see the next / previous page of my report I have to re-open it..
    Is there any known workaround for this?
    Thank you in advance
    Anca

    I would start at Re: Toggle all hide show regions on a page open/closed
    It references the using javascript to manipulate your hide/show regions. It should get you started in the right direction. It is about the most straight-forward example I have seen for what you are trying to do<br><br>
    You could trigger the javascript after your page is rendered by calling it from the page footer and reference the values of page items to determine if you are supposed to hide the region(s).<br>
    Create a page item called P88_HIDESHOW_REGION1 and set it's value to Y or N depending on whether the #REQUEST# has a string in it that is part of report pagination. If you hover over a "next page" button in a report, check out the resulting URL that pops up in your browser.....it looks like ..../f?p=900:210:8352027355600111016:pg_R_241403738845262873:NO&pg_min_row=31&pg_max_rows=30&pg_rows_fetched=30
    <br>
    You could do an instr(:REQUEST,'pg_R_') > 0 then set P88_HIDESHOW_REGION1 = 'Y' else P88_HIDESHOW_REGION1 = 'N'. Your javascript called at the footer of the page could set the display of the region to on or off depending on the result of P88_HIDESHOW_REGION1

  • Show region if field in recordset is NOT empty

    Hi
    Ive been using dreamweaver's built in "show region if
    recordset is not empty," but now i need to change the code so that
    it "shows the region if a field in the recordset is empty"
    Does anyone know how to do this ?
    below is my code for "show region if recordset is not empty"
    recordset: rsUser
    field to filter:image
    <div id="avatar">
    <?php if ($totalRows_rsUser > 0) { // Show if
    recordset not empty ?>
    <img src="uploadedImages/userImages/<?php echo
    $rsUser->Fields('image'); ?>" height="92" width="92">
    <?php } // Show if recordset not empty ?></div>
    basically if the field "image" from rsUser is empty i dont
    want the image to show.
    thanks

    Use the Show If recordset Is Empty server behavior.
    <?php if ($totalRows_rsUser == 0) { // Show if recordset
    empty ?>
    <p>Empty</p>
    <?php } // Show if recordset empty ?>
    Ken Ford
    Adobe Community Expert
    Fordwebs, LLC
    http://www.fordwebs.com
    "Kamesh192" <[email protected]> wrote in
    message news:epkqn2$gr2$[email protected]..
    > Hi
    >
    > Ive been using dreamweaver's built in "show region if
    recordset is not empty,"
    > but now i need to change the code so that it "shows the
    region if a field in
    > the recordset is empty"
    >
    > Does anyone know how to do this ?
    >
    > below is my code for "show region if recordset is not
    empty"
    >
    > recordset: rsUser
    > field to filter:image
    >
    > <div id="avatar">
    > <?php if ($totalRows_rsUser > 0) { // Show if
    recordset not empty ?>
    > <img src="uploadedImages/userImages/<?php echo
    $rsUser->Fields('image');
    > ?>" height="92" width="92">
    > <?php } // Show if recordset not empty
    ?></div>
    >
    > basically if the field "image" from rsUser is empty i
    dont want the image to
    > show.
    >
    > thanks
    >
    >

  • How is a JQuery Vertical Accordian Different Than A Hide-Show Region

    Hello Everyone.
    I an using Apex 4.0.1. I recently learned how to create a JQuery vertical accordian. I'm using the sample accordian that Patrick Wolf recently created/posted. It uses a really nice "accordian template" that he put together. It's really quite useful when it comes to saving space and all on a page.
    Then I began wondering: How is this accordian different than Apex's own builtin Hide-Show Region template?
    And so, I created a sample page on my workspace in apex.oracle.com. I placed a JQuery vertical accordian that consists of 3 regions: 2 reports and a chart. I added a little bit of JQuery to Patrick's template that causes all 3 accordian slices to be closed as opposed to the default behavior of having one slice always open. I also added code that allows a user to re-size the entire accordian either vertically and/or horizontally.
    I then created 3 additional regions that mimic the first 3 regions above. These I placed in "column 2" on the page. For each region I assigned the "Hide-Show" template.
    As far as I can tell, both the accordian and the Hide-Show regions provide the same functionality.
    For the interested, here is a link to my page:
    http://apex.oracle.com/pls/apex/f?p=49919
    The app has open authentication assigned, and so, no login credentials are needed. Please click the "Accordian" tab.
    I realize that the accordian has more flexibilty in that one may add features like choosing to collapse/not collapse all slices and re-sizing, etc. I suppose one could do similarly for the Hide-Show regions using Javascript or JQuery but it would likely be an effort.
    Admittedly, such added features are cool and all. Still, it's been my experience that in the majority of business-like production environments, such "cool" features are pretty much useless. For example, I do not see how re-sizing the accordian or Hide-Show regions has much purpose. In fact, such "cool" features often get in the way of the main goal of the application.
    Of course, a JQuery accordian may also be created that expands/contracts slices "horizontally". I do not know of any way to do the same thing using Hide-Show regions. If someone does know how to do this, I (and likely others) would sure appreciate you sharing how.
    So, then, with respect to basic functionality (saving page real estate by encapsulating several regions), how is a JQuery vertical accordian any different than Apex's own builtin "Hide-Show" region?
    Thank you all for your thoughts/adice/code.
    Elie

    Hello Jari.
    Thank you for your help.
    Yes. Now I do understand what it is you are doing in your accordian page. And also I want to thsnk you for providing the sample code on your page showing how to go about preserving the current state of the accordian when you navigate from/to the page.
    You commented that this kind of state preservation is not available with the Hide/Show region. I'm thinking that you are correct, though I think I once saw something about doing this posted in this Forum. I'll search through and see if I can locate it.
    In any case, have you (or anyone else reading this thread) any other differences between a JQuery vertical accordian and Apex's own Hide/Show region? Other than being able to apply Javascript to an accordian to do things like preserve it's state (like you did), what else may one do with an accordian that is not doable (or at least not easily doable) with a Hide/Show region?
    Thank you for any further advice.
    Elie

  • Can you have a show region in a dwt?

    I have a title bar that I want it to say "log in" if the user isnt logged in
    and "log out" if the user is logged in.  I have a php site that utilizes a
    template.  Can I have a show region in a template?

    Can I have a show region in a template?
    I don't see why not.
    Nancy O.

  • Show more than 5 column in web analyzer

    dear all,
    how can i set web analyzer to show more than 5 column , for examples all kfigures in one page?
    thanks

    Hi John,
    Open the Web Application Designer.
    Open the 0Analysis_Pattern file. (This is the default template for Web Analyzer)
    On Properties panel select Analysis(Grid)
    Select Web Item Parameters Tab
    Look for Paging section.
    On Number of Data Columns displayed at once change from 4 to 16
    On Number of Data Rows displayed at once change from 10 to 100
    Finally Save the 0Analysis_Pattern file.
    The 0Analysis_Pattern is included in the Business Content. So, if necesary you can recover the original version.
    Hope it helps.

  • How to get Header Column Content based on MIN or RANK

    Hey Everyone,
    I am trying to grab the header content based off of the lowest of three values.
    If I have:
    How do i get the column header of the lowest price?
    I tried VLOOKUP and MIN and RANK. And is its easier can I just rank the with the column header in each cell?
    Like:
    Company X - $1.00
    Company Y - $2.00
    Company Z - $3.00

    jjmancini wrote:
    What i would like to have ideally is for the right most column to rank in each column from lowest to highest.
    Example of last Column:
    1) $1.00 - Company X
    2) $2.00 - Company Y
    3) $3.00 - Company Z
    That would be the ideal solution.
    At least three, Yvan.
    I'm still not clear what this result is ranking, jj. That's partly due to the sample data in your table:
    The results shown are both the rankings of the prices in row 2 and the rankings of the lowest prices in each column. Which is it you are looking for? I've assumed you want to compare prices in each row.
    Second complication: In the column 1 header, the content is "Price Company X"; in the Example of last Column, the resulting text, which you want picked up from that header is "Company X".
    While that's not too difficult to pick off for the examples, where each 'company name' has exactly 9 characters, the simple solution won't work for 'real' companies. Placing the exact text you want copied into this row would simplify the task. See example below.
    Third complication: Although A2 on your sample shows "1.00", the actual content of the cell is "1", and the ".00" is added to the display by setting format for the cell. When picked off by a function, only the value is picked up, and it's that value that's available to the formula constructing the text string in the last column. I've avoided that by placing the company name and the price in separate cells.
    Formulas:
    Auxiliary table: A3: =SMALL(Main :: $B3:$D3,COLUMN())
    Fill right to column C. Fill Down to row 12 (to match Main table's data rows).
    Main Table: F3: =Auxiliary :: $A3
    Main Table: H3: =Auxiliary :: $B3
    Main Table: J3: =Auxiliary :: $C3
    Construct each of these three separately.
    Main Table: E3: =LOOKUP(F3,$B3:$D3,$B$2:$D$2)
    After clicking Accept, Copy cell E3, then select and Paste in G3 and I3.
    Pasted formulas will be the same except for the F3 reference.
    After placing these formulas, select cells E3:J3 and fill down to row 12.
    The Auxiliary table is used to sort the prices, and may be hidden. It may also be eliminated by replacing the formulas in F3, H3 and J3 with
    F3: =SMALL($B3:$D3,1)
    H3: =SMALL($B3:$D3,2)
    J3: =SMALL($B3:$D3,3)
    Formatting will need to be reset for these columns.
    Regards,
    Barry

  • Show region server behaviors

    Regarding Dreamweaver's dynamic website option of "insert>data object>show region>show if recordset not empty", is there any way to create a show region which only shows the HTML if a particular record from the recordset is not empty?

    No.
    what I need is that when a recordset does turn up information (i.e. the searched-for database row has inputed values in its columns), yet one of those columns is blank then I do not want to show certains text.

  • ALV report shows fixed number of columns for a user ?

    Hello,
    I have an issue wherein I have created an ABAP ALV grid display in a WD ABAP application and hosted it onto portal. Now, all the users can see the correct number of columns for the report which are determined dynamically. But just for one user, irrespective of which report she launches it shows her only 4 columns.
    Can anybody suggest why this kind of behavior.
    Appreciate your help.
    Regards,
    Samta.

    Hi,
    Right, click the button "manage layout" or "save layout" and remove any default user settings...
    added: didn't read carefully sorry ;)... better check user settings in SU01 if no ALV parameter is used.
    Kr,
    m.
    Edited by: Manu D'Haeyer on Oct 21, 2011 8:53 PM

  • Sharepoint 2013 web service to update column content

    I have a folder in a sharepoint list. Folder have columns ie Title, modified by, modified date, details. I am trying to update details column content with csharp code for that folder. I am trying to find sharepoint service method to update a column content
    for a list item.
    Added my sp site service ex: http://mysite/_vti_bin/Lists.asmx as reference
    I included service reference in my project and create object.
    I am referrring the below service to check if I can use any method from it but unable to find it. Do we have any method to 
    https://msdn.microsoft.com/en-us/library/ms774680(v=office.12).aspx
    Sri

    Hi Sri,
    Per my understanding, you might want to update item using Lists Web Service.
    In Lists.asmx, the methods available are as below:
    https://msdn.microsoft.com/en-us/library/lists.lists_members(v=office.12).aspx
    I suggest you follow the documentation below about updating list item using Lists Web Service for a try in your environment:
    https://msdn.microsoft.com/en-us/library/office/ms440289(v=office.14).aspx
    Thanks         
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Validation on items in Hide/Show Region

    I have a validation on an item that is in a hide/show region. I display all my errors in-line with the field. When the validations fires, after the page is submitted, the hid/show region is closed so the user can't see the error. Is there a way in the validation to open the hide/show region so the error can be seen? I had tried this in my validation, but it doesn't work.
    htp.p('<script language=javascript>
    document.getElementById(' || '''' || 'P507_REPORT_SCHEDULER' || '''' || ').style.display=' || '''' || 'block' || '''' ||
    '</script>');

    Hi,
    You can try below steps:
    1) In PR, get handle to Hide Show bean.
    OADefaultHideShowBean hsb = (OADefaultHideShowBean)findIndexedChildRecursive("beanID") ;
    2) Expand the bean by using 'setDefaultDisclosed' property.
    hsb.setDefaultDisclosed(pageContext, Boolean.TRUE) ;
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for