Comparison with Colorization - InfoPath Dev
in

InfoPath Dev

Comparison with Colorization

Last post 07-11-2011 01:03 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-30-2011 08:01 AM

    Comparison with Colorization

    Hello all,

     I have a SQL DB that holds the results from an employee skills survey (In the survey you basically input how proficient you are from 1-5 at each predefined IT Skill) and an InfoPath form needs to be created to compare one employee's skills vs another "model" employee's skills.  Upon opening the IP form you pick the 2 employees you wish to compare and then proceed to the next screens where you see 3 columns listed: Column 1: Skill List (pulled from db), Column 2: Employee1's Skill Levels (pulled from db), Column 3: ModelEmployee's Skill Levels (pulled from db).  This part is complete but I need some further modification.

    Q1. I need to be able to compare Employee1 vs ModelEmployee and highlight in some color to indicate if they are deficient or exceed in each skill.  I have tried some different conditional formatting expressions but I'm missing something.  Here's an example of something I've tried (Title is a field in the DB pulled from Active Directory that holds the name of each employee, ModelEmp and Current Emp are the stored values that hold which two employees you are comparing (picked from a dropdown)): 

    @SkillLevel[../../@Title = xdXDocument:get-DOM()/dfs:myFields/my:test/my:ModelEmp] > @SkillLevel[../../@Title = xdXDocument:get-DOM()/dfs:myFields/my:test/my:CurrentEmp]  

    Any idea on how to do this?

    Thanks very much for the help,

    Jimmy

  • 07-11-2011 01:03 PM In reply to

    Re: Comparison with Colorization

    Sometimes when I'm struggling with conditional formatting, I use some expression boxes to see if my XPath is returning what I'd expect it to. In a section bound to the same group that @SkillLevel is in, put a calculated value control (expression box in IP 2007) and put the first half of your condition in there:

    @SkillLevel[../../@Title = xdXDocument:get-DOM()/dfs:myFields/my:test/my:ModelEmp]

    See what the result is. Then test the second half of your expression... then the full expression.

    Hilary Stoupa

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