Conditional fomatting does not fire for values under 10% - InfoPath Dev
in

InfoPath Dev

Conditional fomatting does not fire for values under 10%

Last post 11-10-2008 10:50 AM by superbovine. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-06-2008 11:47 AM

    Conditional fomatting does not fire for values under 10%

    I have a simple conditional formatting setup for

    ../dfs:dataFields/d:_Data/@YTDScore > my:varGoalScore (green)
    ../dfs:dataFields/d:_Data/@YTDScore <= my:varGoalScore (red)

    My problem when value is before 10% i.e. it does not even fire.  The text box goes back to the original white color.  Everything is double from an access DB.  Is this a percision issue, or should I be troubleshooting the XML part?

     The expression do work for everything over 10%

  • 11-06-2008 09:30 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Conditional fomatting does not fire for values under 10%

    Hello,

    For checking of your condition is correct or not you have to add one expression box in with this condition. Condition is should modified like adding "boolean" function.

    Eg: boolean(../dfs:dataFields/d:_Data/@YTDScore > my:varGoalScore) or

    boolean (../dfs:dataFields/d:_Data/@YTDScore <= my:varGoalScore)

    This value returns true then your condition is satisfied otherwise false.

    Some times condition by default it will not work can you remove once the data and enter again same data in that field.

  • 11-10-2008 10:50 AM In reply to

    Re: Conditional fomatting does not fire for values under 10%

    I put your statement, boolean(...) in and tried several variation and still did not get it to work

     However, I put the statement in an expression pop-up box and the expression:

     boolean(/dfs:myFields/dfs:dataFields/d:_1x1Data/@YTDScore <= /dfs:myFields/my:mainstream/my:varGoalScore)

     and I also pop-up put it YTDScore and varGoalScore values to pop-up

    YTDScore = 8.6345381....E-2

    varGoalScore = 0.11

    boolean(/dfs:myFields/dfs:dataFields/d:_1x1Data/@YTDScore <= /dfs:myFields/my:mainstream/my:varGoalScore) returns false which is incorrect.

    I tried multipling by 100 in the boolean express but YTDScore = NaN which tells me it is a precision problem. 

    Is there anyway to cast a decimal as a double?  I see that xpath 2.0 supports this, but I do not think infopath 2007 supports this.

    I found the solutions, http://www.infopathdev.com/forums/p/8379/30257.aspx#30257.  The solution was for SQL server and I am using acces, but I simple went into datasources manager and changed my query to multiple YTDScore by 100 then I adjusted my Goal values accordingly and everything worked.

     Thanks for your help.

     

     

    Filed under:
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.