Stoplight Format: How to show percent sign next to each value?

I need to show a percent sign next to each data value on a column that has a stoplight format. The calculation has been created and works perfectly. But when I add the stoplight format, the percent sign '%' disappears. For example, acolumn data value is 95.25%. After I add the stoplight formula, 95.25% becomes 95.25.

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!

Similar Messages

  • How to show error message next to the field?

    Hi All,
    I am writing my own form handler and I am trying to show form field errors without using errormessageforeach droplet for learning purpose.
    I am able to show to the fields errors but I want to show them next to the fields.
    How can i achieve this functionality?
    Regards,
    Prateek

    PrateekG wrote:
    Hi All,
    I am writing my own form handler and I am trying to show form field errors without using errormessageforeach droplet for learning purpose.
    I am able to show to the fields errors but I want to show them next to the fields.
    How can i achieve this functionality?
    Regards,
    Prateek
    You can use JQuery/JavaScript to validate for errors and div to show error after field like below:
    <dsp:input type="text"  bean="MyFormHandler.cashierId"  />
         <dsp:valueof bean="MyFormHandler.errorMap.firstname"/>
    <div id="firstNameError">Your error message will goes here<div>
    -RMishra

  • How to enter percent sign"?

    I don't see it on keyboard.

    In the Mail app it shows on my keyboard under the .?123 option in the centre of the middle row. In the Notes app go into .?123 and then tap the #+= button and it should be in the middle of the top row

  • 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!

  • How to show graph that is the same value as the input.

    Hi all, I've got assigned to a China local university to work with students here.
    I have been going thru this tough time thinking how to solve this. When I type 12 the graph shows y-axis point 1 to 2. What I want is the line showing 0 to 12. Can somebody please please please help me?

    You don't even say where you type "12", but most likely all you need is to turn off autoscale for the Y axis.
    LabVIEW Champion . Do more with less code and in less time .

  • How to do percent calculations based on a value

    Hello,
    I'm trying to figure out how to send workflow notifications to only 40% of a selected group..
    For example - We have a survey that is sent out once a user completes our Infopath form - right now the survey goes out to 100% of the users..
    In the future, we would like the survey to ONLY be sent to 1 in 4 users that complete the form - so 40% of all the users that complete will be sent the survey upon completion..
    I know I need to use calculated fields but not sure which formula will work and how to incorporate within our current workflow.
    Any suggestions or how-to's would be appreciated since I'm pretty new to workflows.
    Thanks
    -Andrew

    Hi Andrew,
    You cannot determine 40% of total people who completed the survey randomly.
    If you are using SPD workflow, then this looks tough to do as you have to first find out the total number of Completions (assume 100). (SPDW does not have a way to count the number of items in list. If you can create custom workflow in VS then you can
    use SharePoint API with the list ID and get the count:   myList.Items.Count). Then divide that number by 4 (assume 40). If this is decimal then round it up.  Find the names of top 40 or bottom 40 responses. You cannot randomize 40
    items from the list.
    In my opinion, you need to have fixed algorithm to create workflow out of this. Hope other's can pitch in and provide some inputs.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • How to show no. of contents in each folder in a KM navigation iView....

    Hi everyone,
    Requirement -
    we need to display a KM Navigation iview which shows the count i.e. no. of the contents in each folder.
    Scenario -
    I have tried changing this property - in the resource renderer and have created a new layout set and a layout profile.
    However this doesnt seem to work.
    Please if anyone can help me get the count of the contents in each folder in the KM Navigation iview.
    Thanks and Regards,
    Amol Ghodekar

    Hi Amol,
    see: Number of files in folder
    Hope this helps,
    Robert

  • How can I see tags next to each thumbnail in PS Elements 12? Previous versions had this feature, which I found very helpful!

    Also, how can I create new tags in "Places" without having the map pop up?

    I want to know how to DISABLE the automatic updates and return to the earlier version that has a MUCH better toolbar and is MUCH easier to use I am using MAC OS 10.5.8 on a G5 tower and loved Firefox until now and did NOT want the update that automatically installed itself!

  • Conditional Formatting - how to change cell colour based on cell value

    I am in the process of moving some Excel spreadsheets into Numbers on my iPad. The Excel spreadsheet had conditional formatting in certain cells. If the cell value was less than a certain amount (<46 for example), the cell background would automatically turn yellow.
    Is there any way to make Numbers on iPad do this?
    Thanks for any help you can provide.
    Scott

    I beleive this is one of those doable tings on desktop that gets taken out on ipad. If you would like to suggest this as an idea for apple to put in, please go to http://www.apple.com/feedback

  • FSG Percent Sign

    1. FSG report that I created has Variance % column. How do i append percent (%) sign to all the values under this column. Is there a option in FSG that i can make use of for this? for e.g 10% instead of just 10.
    2. Row set in the FSG report has multiple Row headers. How do i bold these row headers? In my example here how do i make Revenue and Expenses Rows bold?
    For e.g:
    Revenue
    -HW Revenue
    -SW Revenue
    Expenses
    -HW Expense
    -SW Expense.

    Please see these docs.
    Report Manager: Unable To Publish FSG Reports With Percentages Via Excel and PDF [ID 568026.1]
    R12: Question Mark ? Displaying For Percentage Column [ID 736955.1]
    Fsg Output In Adi Not In The Desired Format Using A Custom Theme [ID 331115.1]
    ADI: Percent Symbol(%) Not Displaying In The Published Report [ID 260875.1]
    Thanks,
    Hussein

  • How to show required asterisk for outputText?

    Hi,
    I would like to know how to show required asterisk next to an outputText?
    Thanks
    -Mina

    Hi,
    I'm using an inputText with readonly=true and required doesn't work:
    <af:inputText value="#{bindings.recipient.inputValue}"
    simple="false"
    columns="#{bindings.recipient.hints.displayWidth}"
    maximumLength="#{bindings.recipient.hints.precision}"
    shortDesc="#{bindings.recipient.hints.tooltip}" id="it3" autoSubmit="true"
    partialTriggers="cbSelectGroup cbSelectUser"
    label="Recipient:" required="true"
    readOnly="true">
    <f:validator binding="#{bindings.recipient.validator}"/>
    </af:inputText>
    Do you know why?

  • I had switches off my iPhone 5 at around 20 percent battery next morning I was not able to switch it on. I tried to get it charged but it didn't showed any sign of charging even when plugged in for about 2 hours. I had to take it to apple care centre

    I had switches off my iPhone 5 at around 20 percent battery next morning I was not able to switch it on. I tried to get it charged but it didn't showed any sign of charging even when plugged in for about 2 hours. I had to take it to apple care centre but they refused to repair it after confirming the problem with the device as it was out of warranty and asked me to get it replaced for INR 22500. I got it repaired outside but after that also if I switch it off in the same situation it again happens and I have to take it for repair it has happened 3 times after that. Is it a inherent problem in iPhone that it uses battery even when switched off and if in that case battery drain out then refuse to get charged because this is the scenario i have experienced every time?

    Apple told you it was unrepairable.... You had it serviced by an unauthorized party. It's now no longer eligible for out of warranty replacement by Apple.
    There's really nothing else we can say about it. Find a competent 3rd party repair shop or buy a new one.

  • I have a 5th Gen iPod Touch, I  downloaded an album and 2 of the songs had music videos. I didn't like it so I deleted it. But it still shows the song and the cloud sign next to it. How can I permanently removed songs/vids? On iOS 7

    I have a 5th Gen iPod Touch, I  downloaded an album and 2 of the songs had music videos. I didn't like it so I deleted it. But it still shows the song and the cloud sign next to it. How can I permanently removed songs/vids? On iOS 7

    Go to Settings>iTunes and App Store and turn off SHOW ALL

  • Column format with percent ( % ) sign

    Is there column formatting for percent ( % ) signs?
    One of the fields in the report currently displays a number, e.g. "3.75", but need to add the percent ( % ) sign, e.g. "3.75%".
    I found the following:
    * To display "$5,234.10", I can use "FML999G999G999G999G990D00", this formats with a dollar ( $ ) sign and two decimal places.
    * To display "-5,234.10", I can use "S999G999G999G999G990D00", this formats with the sign ( + ) or ( - ) and two decimal places.
    However, I fail to find how to add the percent ( % ) sign...
    -Frank

    Thx for this hint. The only Problem with this solution is that the ‘%’ is also shown when the value is NULL.
    Has someone solved this also for NULL values where there should be nothing in the cell.
    Some solution but not very nice is to do this in the query itself.
    select ltrim(to_char(value, '999G999')||'%','%') from dual
    another one may by
    select to_char(b.COST_MATERIAL,'999G999L', 'NLS_CURRENCY = ''%''')
    from budget b

  • In the slide show view how can you pin the "next" Arrow to the ultimate edge so it is in the same place as the full screen image, it will pin to the left edge but not the right.

    In the slide show view how can you pin the "next" Arrow to the ultimate edge so it is in the same place as the full screen image, it will pin to the left edge but not the right.

    Hello,
    Please make sure that the next button is pinned to the right side as there in the attached image.
    If it is already pinned, you can try removing any embedded HTML code and checking it.
    Regards,
    Neha

Maybe you are looking for