locked
XPath Conditional Formatting Show Content Problem RRS feed

  • Question

  • I have a XPath Conditional Formatting Show Content Problem. I am trying to show a field when the current time is between 11:00 am and 1:00pm.

    I am using the following logic into Conditional Formatting | Condition Criteria | Advanced | Edit the XPath Expression:

    number(substring(ddwrt:TodayIso(),12,2))>11 and number(substring(ddwrt:TodayIso(),12,2))<13

    But after I enter the criteria, it strips the TodayISO out, and ends up with the following which does not work:

    number(substring) > '11' and number(substring) < '13'

    How do I use Conditional formating to display my field during the timeframe specified?

    Thank you

    Thursday, December 1, 2011 11:05 PM

Answers

  • After trying many different things, I was able to resolve this as follows:

    If the following is entered, the logic fails:

     

    number(substring(ddwrt:TodayIso(),12,2))>11 and number(substring(ddwrt:TodayIso(),12,2))<13

    However, if the logic is swapped as follows, everything works as expected:

     

     

    11>=number(substring(ddwrt:TodayIso(),12,2)) and number(substring(ddwrt:TodayIso(),12,2)) <13
    • Edited by jmcpsd Friday, December 2, 2011 8:48 PM
    • Marked as answer by star.warsModerator Friday, December 30, 2011 3:39 AM
    Friday, December 2, 2011 6:58 PM