Compound condition with cfif

I am creating a page for ambulance patient off-load times
(USOL). The time is measured in seconds and I want to present it as
either mm:ss or hh:mm:ss depending on whether it takes more than an
hour or less. So my logic is:
if less than 1 second then - (nothing)
If >=1 and < 3600 seconds then format as mm:ss
if >3600 seconds then format as hh:mm:ss
My code snippet is:
<td>
<cfif USOL lt 1> -
<cfelseif USOL gte 1 AND USOL lt 3600>
#timeformat((USOL/86400),"mm:ss")#
<cfelse USOL gte 3600>
#timeformat((USOL/86400),"hh:mm:ss")#
</cfif>
</td>
Coldfusion 8 chokes on this. Is my syntax wrong? Is there a
better way of doing this?

Ian Skinner wrote:
> Kulp wrote:
>> I am creating a page for ambulance patient off-load
times (USOL). The
>> time is measured in seconds and I want to present it
as either mm:ss
>> or hh:mm:ss depending on whether it takes more than
an hour or less.
>> So my logic is:
>>
>> if less than 1 second then - (nothing)
>> If >=1 and < 3600 seconds then format as mm:ss
>> if >3600 seconds then format as hh:mm:ss
>>
>> My code snippet is:
>>
>> <td>
>> <cfif USOL lt 1> - <cfelseif USOL gte 1 AND
USOL lt 3600>
>> #timeformat((USOL/86400),"mm:ss")#
>> <cfelse USOL gte 3600>
#timeformat((USOL/86400),"hh:mm:ss")# </cfif>
>> </td>
>>
>> Coldfusion 8 chokes on this. Is my syntax wrong? Is
there a better
>> way of doing this?
>>
>
>
> If I recall correctly timeFormat() only takes a time
object, not on
> integer representing seconds. I would probably do
something along these
> lines.
>
> <cfif USOL lt 1>
> -
> <cfelseif USOL gte 1 AND USOL lt 3600>
> #int(USOL/60)# : #USOL mod 60#
> <cfelse USOL gte 3600>
> #int(USOL/3600)# : int((USOL MOD 3600)/60) : #USOL mod
3600#
> </cfif>
>
Ok, I knew I had that hh:mm:ss calculation off:
#seconds# - Hours:#int(seconds/3600)# Minutes:#int((seconds
mod 3600) /
60)# Seconds: #(seconds mod 3600) mod 60#

Similar Messages

  • Cisco ISE 1.3 AV Compound Condition

    Hello Everyone,
    I'm trying to create an AV Compound Condition in my ISE version 1.3, but, when i click on the vendor to select my AV Vendor, i can't see the vendors and more.
    I saw in another discussion that is can be a browser problem, but i have just downgrade my Firefox to the version 30.X and the problem still persists.
    Can you help me? Image attached.
    Thank you.

    Rafael,
    First, I have Firefox 31.2.0 ESR Installed
    You can get it from here:
    https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/31.2.0esr/
    Note that ISE 1.3 requires AT LEAST version 31 as noted in the Release Notes:
    I noticed in your Screen Capture that once you selected the Operating System, the first line under Products for Selected Vendor did not populate.  Here is what me screen shows once I select the Operating System:
    Without that line, my AV Vendors selection box looks the same as yours, empty.  Once I selected the OS, I could then choose from the AV Vendors.
    Install FF 31.2.0 ESR (The ESR versions do not auto update) and ensure that the latest Flash Player is installed (minimum is 11.2.0.0) and please report back with your findings.
    Please Rate Helpful posts and mark this question as answered if, in fact, this does answer your question.  Otherwise, feel free to post follow-up questions.
    Charles Moreton

  • ACS v5.2 - Unable to add enumeration attribute to compound condition

    Hi,
         I have created an Internal User attribute and made the attribute type Enumeration so that only certain values can be selected. I am trying to apply this attribute to a compound condition. However, when I select the value of the enumerator for the compound condition none of the configured values show in the pop up window. (It is easier to explain with the screenshots.). Is there a way this can be done? Any advice would be appreciated.
    Many Thanks
    Dave

    I recreated your issue both in ie and firefox. I tried to remove the spaces from the enumerated strings but it didn't help
    Note the enuemrated conditions do work for simple conditions. That is when in you customize the table you select CAR as a condition; rather than using a compound conditon.
    I did find a CDETS for this issue:
    CSCtg51846: Enum values are not shown in compound conditions in rule

  • CASE Statement in Where Condition with Multi Valued parameter in SSRS

    Hi All,
    I am little confused while using CASE statement in Where condition in SSRS. Below is my scenario:
    SELECT
    Logic here
    WHERE
    Date IN (@Date)AND
    (CASE
    WHEN NAME LIKE 'ABC%' THEN 'GROUP1'
    WHEN ID IN ('123456', '823423','74233784') THEN 'GROUP2'
    WHEN ABC_ID IS NULL THEN 'GROUP3'
    ELSE 'GROUP4'
    END ) IN (@GROUP)
    So above query uses WHERE condition with CASE statement from @GROUP parameter. I want to pass this parameter as multi- valued parameter and hence I have used CASE statement IN (@GROUP).
    For @Date one dataset will pass the available and default values and
    for @GROUP parameters, another dataset will pass the available and default values.
    But this is not working as expected. Please suggest me where I am making mistake in the query.
    Maruthu | http://sharepoint-works.blogspot.com

    Hi Maruthu,
    According to your description, I create a sample report in my local environment. It works as I expected. In your scenario, if the selected values from the Date parameter contains some of the Date field values, the selected values from the GROUP parameter
    contains some of GROUPS (‘GROUP1’,’GROUP2’,’GROUP3’,’GROUP4’) and the corresponding when statement is executed , then the dataset returns the corresponding values.
    In order to trouble shoot this issue, could you tell us what results are you get and what’s your desired results? If possible, you can post the sample data with sample dataset, then we can make further analysis and help you out.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Need to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.

    Hi All
    I have one sharepoint list with huge data i.e with 20columns and more than 200 records with the fields .
    Suppose lets consider there are A,B,C,D,E,F,G,H columns.
    Now i want to create one form with the fields A,C,E.
    When the user enter the existing data of list for columns A,C..based on C value the E column value should change and update that particular item in the list.
    Please guide me without visual web part can we acheive this by Sharepoint designer 2013 or what would be the preferable solution.
    Please help me on this as it is very urgent from me..
    Thanks in Advance
    Sowjanya G

    Hi,
    According to your post, my understanding is that you wanted to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.
    I recommend to create workflow associated to the list and then start the workflow automatically when an item is changed.
    In the workflow, you can add condition and actions as below:
    If current item: C equal to Test1
         Set E to Test2
    Then the value of the filed E will be changed based on the value of the filed C.
    In addition, if you create the form using InfoPath, you can add rule to the filed C as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Since updating to IOS 8.1 on ipad mini can't download apps.  Apps show "waiting." Have reset to new condition with no improvement.  Any solution?

    Since updating to IOS 8.1 on ipad mini can't download apps from iTunes store.  Apps show "waiting." Have reset to new condition with no improvement.  Also turned off Wi-Fi and re-connected.   Any solution?  Thanks,

    If you restored your iPad as new, and it still didn't help, I don't know if anything in here will help. in any event, I have posted this boilerplate of suggestions many times in the past and the suggestions in here have worked for others at one time or another. Feel free to give them a try.
    1. Tap the "waiting" icon and see if you can pause it. If it does pause, then tap it again and see if it will resume. If that works, repeat the same steps for each "waiting" icon.
    2. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    3. Make sure that you do not have a stalled download in iTunes - if you have a download in there that did not finish, complete that one first. If you see a downloads tab in the lower right corner, then there is a download in iTunes.
    4. If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
    5. You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again. Apps may also be able to be deleted in Settings>General>Usage>Storage if you cannot get the X to pop up on the icon.
    6. You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered.
    7. Reset your router. Unplug it from power for about 30 seconds and then plug it back in again.

  • Using where condition with dynamic internal table

    Hi Friends.
    How to use where condition with dynamic internal table ?
    Regards,
    Amit Raut

    Hai Amit
    REPORT  ZDYNAMIC_SELECT                         .
    TABLES: VBAK.
    DATA: CONDITION TYPE STRING.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    END OF ITAB.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    CONCATENATE 'VBELN' 'IN' 'S_VBELN.'
    INTO CONDITION SEPARATED BY SPACE.
    SELECT VBELN POSNR FROM VBAP INTO TABLE ITAB
    WHERE (CONDITION).
    LOOP AT ITAB.
    WRITE 'hello'.
    ENDLOOP.
    Thanks & Regards
    Sreenivasulu P

  • ISE Authorization Compound Condition

    I am trying to add a compound condition that points to an internal identity group in an authoirization profile. Something like the rule below.However the rule never gets applied for users in the IT identity group. It moves to the next rule down and applies permissions based off another rule specific for just the device type. If I change the rule conditions to use the identity group instead of the device type it works. However, I want to limit the rule to device type and Identity group. Any ideas would be appreciated.
    Rule Name: test       Conditions: Android and IT (Expression: InternalUser:IdentityGroup EQUALS IT) then PermitAccess                  

    try creating device groups and match them
    Network Device Groups List > New Network Device Type
    Network Device Groups
    * Name               
    Description       
    * Type  
    Authentication RulesEnabled
    Name
    Condition
    Protocols
    Identity Source
    Options

    TestAuthentications
    IF
    Device:Device Type = Device   Type#All Device Types#Test
    allowprotocols
    DefaultNetworkAccess
    and use
    demo.local
    RejectRejectDrop

    MAB
    IF
    Wired_MAB
    allowprotocols
    DefaultNetworkAccess
    and use
    InternalEndpoints
    RejectRejectDrop

    Dot1X
    IF
    Wired_802_1X
    allowprotocols
    DefaultNetworkAccess
    and use
    AD_InternalUsers
    RejectRejectDrop

    Default Rule(if no match)
    allowprotocols
    DefaultNetworkAccess
    and use
    Internal Users
    RejectRejectDrop

  • Mandatory Condition with parameters

    I am trying to enforce a rule that a date range must be specified whenever querying a particular table. I tried using a mandatory condition with parameters, but it appears that parameters can only be used in workbooks, not in business areas. Have I got this right ? If so, is there any other way the administrator can enforce this rule ?

    You are right that parameters are not supported by Discoverer Administrator. But on metalink there are documents on how to accomplish it manually: note 282249.1 and 304192.1
    Regards,
    Sabine

  • Race conditions with UI thread

    Hi community,
    the update to LabVIEW 2014 has caused sveral of my vis to act up - vis that I had coded with race conditions with the UI thread that I was not aware of.
    Maybe they didn't exist previously, maybe I was just ignorant.
    Here is a where I first noticed something was wrong. It has a workaround inside:
    http://forums.ni.com/t5/LabVIEW/How-to-make-sure-plots-in-xy-graph-are-present/td-p/3033109
    Thanks again Norbert for your help with that.
    Now problems are showing up in other places too and it might be the tip of an iceberg. I'm a little afraid right now. It's not just xy graphs. The latest example:
    I have a sub-vi whose frontpanel I open with an invoke node inside that sub-vi. Afterwards, in the caller I register for events of frontpanel objects of the sub-vi. This fails now - apparently the fp of the sub-vi isn't open yet although the sub-vi has finished executing (yes, I use dataflow to ensure register for event is done only after the sub-vi has finished). This has a striking resemblance to my issue in the previous thread. It seems that vis can now be "finished" executing while stuff that was supposed to happen inside the sub-vi is still executing in the UI thread.
    I had not expected this.
    Is this intended behaviour?
    Is this new to LabVIEW 2014?
    Can someone please shed some light on this behavior change (if indeed it is one)?
    Can someone please advise me on a general solution/workaround for the host of problems this is causing me?
    Best regards
    Florian

    Norbert,
    I'm currently unable to reproduce the issue in my code regardless of cpu core affinity (you gotta hate random errors).
    I have attached an example that shows a simplified version of the code that has previously produced the error.
    This example might be flawed since it hasn't produced the error yet.
    The issue would show when the button "open window" is pressed, if it did at all.
    Also there is stuff in there that I just implemented in an attempt to keep the UI thread busy.
    For the core of the issue please disregard the bottom while loop in caller.vi
    I'll keep trying.
    Best regards
    Florian
    Attachments:
    subvi event registration.llb ‏56 KB

  • Validation result of a compound linestring with Oracle 10.2.0.4

    Hello,
    I have a question.
    I was told that:
    "in 10.2.0.4, Oracle no longer allows compound linestrings or compound polygons with one sub-element. For compound elements, there must be at least 2 sub-elements (at least one arcstring and one straight line linestring)."
    But in the following test, there is only one arcstring, therefore, the following should be invalidate in Oracle 10.2.0.4
    select SDO_GEOM.VALIDATE_GEOMETRY(SDO_GEOMETRY(3002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 4, 1, 1, 2, 2), SDO_ORDINATE_ARRAY (1271333.86, 519747.853, 0, 1271313.26, 519729.981, 0, 1271302.94, 519704.74, 0)), 0.0005) as valid  FROM dual;I tested with Oracle 10.2.0.4 on:
    -- 32-bit Windows 2003 R2
    -- 64-bit Solaris 10
    -- 64-bit AIX 5.3
    The above validation all return true. (also true for Oracle 11.1.0.6.0 on 32-bit Windows 2003 R2).
    Do I miss something?
    Thanks!
    Edited by: modeler on Jun 16, 2009 1:19 PM

    This change was not in 10.2.0.4 patch set, but it is part of a one-off patch for bug 7261968 on top of 10.2.0.4.
    So this will be in 10.2.0.5 and 11gR2 as well.
    siva

  • T code/ report to list all material sales pricing condition with deletion i

    I create sales org/ material level pricing conditions in VK11. Some unwanted material pricing conditions are with Deletion indicator active. Iu2019m looking for a report to list all material sales pricing condition with deletion indicator active.
    Please advice me on this.

    Hi Goto v/ld and select 16 which stands for individual prices, and then populate sales organization, distribution channel, customer ,material numbers,etc...and tick "Cond.marked for deletion" check box in "list screen" tab which is the most important, execute you will be able to see all material pricing condition even though it had been deleted.

  • Create pricing condition with default value in processing process field

    hi all,
    when i maintain the pricing conditions with vk11 or vk31, i want the price maintained is set default as blocked (the processing status field-KBSTAT). can it be done? i am using 4.6c.

    You should try to use transaction variant
    <i>Transaction variants simplify transaction flow by:
    Inserting default values in fields
    Changing the ready for input status of fields
    Hiding various screen elements and menu functions, or even entire screens
    Adjusting table control settings
    When you create a transaction variant, you run through the transaction in a special mode. In this mode, you decide which elements you no longer need in your transaction and which values should be inserted where. If you choose to hide an entire screen, the system will no longer display that screen in the transaction and will proceed on to the next screen in the series. You can also adjust table control settings and determine the width of columns and the order in which you want them displayed. In tab strips, you can suppress tabs that you no longer need by setting them to invisible.
    You may also create as many variants for a transaction as you desire. One of these variants can be defined as a standard variant. This variant is then valid across all clients. You may also assign different variants to specific users.
    This is done using Variant Transactions. Variant transactions are then places in those users’ user menus instead of the standard transaction. </i>
    To use this : Tools -> Accelerated SAP -> Personalization (transaction SHD0)
    Regards

  • Group condition with varying keys

    Hi every one,
    How to declear group condition with varying keys.
    gajanan

    Hi Rudrag,
    What Karan has mentioned is absolutely correct.
    To simpify it,
    Suppose you have two materials M1 and M2 for which you want to give customer/material specific discount.
    Create one material pricing group (e.g, 01) in customising, assign the Material Pricing group 01 to both the material in their respective material master in Sales org 2 view.
    In V/06, open the condition type K005, activate the "Group condition" check box and assign "Routine 3" in the "Gorup condition routine" check box by selecting the value from the drop down.
    Now create condition record for Condition type K005 in t.code VK11 for the two materials for one specific customer.
    For example, for cudtomer C1 and Material M1, discount is Rs.10 per Piece(PC).
    Go to scale and specify in the scale that if 10 Pieces then discount is Rs.15 per piece.
    Similarly, for Custome C2 and Material M2 maintain a condition record for discount is Rs.20 per piece.
    Go to scale and maintain and specify that, if 10 pieces order then discount will be Rs.25 per piece.
    Now create a Sales order for the Customer C1 with the two material M1 and M2 with quantity 4 pieces and 6 pieces respectively.
    System will add up the quantities of both the material as 4+6=10 pieces.
    Even though, there respective order quantities are 4 pieces and 6 pieces , but still both the item will avail the discount for 10pieces level beacuse of the group condition settings.
    But, the rate of the discount will taken from there individual condition record.
    That means, M1 will get discount of Rs.15 per piece. So for  4 pieces discount will be Rs.60.
    Similarly, M2 will get discount of Rs.25 per piece. So for 6 pieces  discount will be Rs.150.
    If there is no setting for group condition then, M1 would have got discount of Rs.40 and M2 would have got discount of Rs.90.
    I hope this is clear.
    Regards
    Pradyumna

  • Conditions with Fixed end date before Loan term end

    Hi gurus,
    Please how do I set up an interest condition that should accrue and post only for the first six months of a loan with a 60 months repayment term?
    When I enter 1 in the frequency, it calculates for the whole of the loan period. When I leave the frenquecy blank, it calculate for the whole of the six months, and post the total on the sixt month.
    What I want is the interest to accrue and post monthly only for the first six months.
    Thanks
    Fisayo.

    Hi,
    You are expecting to set a condition for the first 6 months of the loan term where your contract is maturing after 60 months. If so please create an interest condition with out specifying any frequency but provide calc start date = start of term of contract and calc end date = (date completing 6 months after term start )- 1 day, due date = 6 months after term start. For eg: if your loan start date is 01.01.2010 and end of term is 31.12.2014:
    Interest Condition details:
    Int Start Date = 01.01.2010
    Calc End date = 30.06.2010
    Due Date = 01.07.2010
    Freq = NIL
    I hope by setting above condition, you can get the required cash flows for first six months only.
    Regards
    Prasad AV

Maybe you are looking for