Formatting Text - InfoPath Dev
in

InfoPath Dev

Formatting Text

Last post 12-07-2006 04:53 PM by Greg Collins. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-06-2006 08:06 AM

    Formatting Text

    Hi everyone! I'm trying to create a documentation process and am in desperate need of some help.

    I have created a Form View with various repeating sections included. The Infopath fields are linked to a SQL database for archiving purposes.

    My question is the following:

    Is there a way to have the form automatically format the color of the text that has changed since the form was last formatted? For instance, my users are filling out the same form once a day to report their daily status up the management chain. The managers would like to see their changes in a yellow highlight color and the previous days data in a blue highlight with the strike through font.

    I am aware of the conditional formatting in the properties section, but I'm clueless as to how to compare the changes made today vs. the changes made yesterday and how to display both the old and the new(if something was updated) in one form.

    THANK YOU FOR YOUR HELP!!

    Javier
  • 12-06-2006 02:03 PM In reply to

    It sounds like what you need is to add an OnAfterChange handler to the root node. Then when a field changes, the event will bubble up from that field to the root node, where you can catch it, identify the field that has changed, and then sent a property on that field to identify that it has been changed.

    Once the field property has been set, you can use conditional formatting to check that property and change the field color.

    The following article is about a different subject, but can be used to assist you in figuring out how to set the field property (i.e. using SetNamedNodeProperty) so that your conditional formatting will work: Highlight the Active Field
  • 12-06-2006 02:07 PM In reply to

    My appologies. I think I didn't answer your question correctly. You want to be able to highlight just the updated portion of an existing field value, rather than the entire field when the entire value has changed.

    That gets extremely complicated and is out of scope for this forum. It is essentially writing a diff-ing algorythm and manually updating each field (each would of necessity be required to be a rich text field to make this work) via code. Then those changes you made (for coloration) would have to be stripped back out during save/submit.

    Honestly, doing a visual-diff-update (which has been requested by numerous people) is likely going to be far more costly than your employer is willing to deal with.
  • 12-07-2006 08:06 AM In reply to

    Greg,

    Thanks for your help. Im essentially trying to do this:

    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=3648

    Javier
  • 12-07-2006 08:26 AM In reply to

    Hey Javier,

    I posted a reply on the other thread, you might want to check it out and move the whole discussion over there.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-07-2006 04:53 PM In reply to

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