conditional format by comparing guids not working - InfoPath Dev
in

InfoPath Dev

conditional format by comparing guids not working

Last post 07-30-2009 06:23 AM by CraigW. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-27-2009 07:51 AM

    conditional format by comparing guids not working

    Hi,

    I have a very strange problem with a conditional format on a repeating table not working properly.

    I have a sharepoint workflow task form, which is passed an id value into the task ExtendedProperties, which is a string representation of the UniqueId of the list item that the workflow is running against. 

    In the form, I have a repeating table which is bound to a data connection that is from a sharepoint list.  The list contains a column which is a string, which holds a string representation of the same UniqueId for the list item.  It is effectively a foreign key to the workflow items list.  In the form, I can output the column value to see it and it is definitely there.

    In workflow code, I pass the UniqueId for a into ExtendedProperties.  When the form opens, I see the passed value in a textbox that I have added and bound to that value.

    If the form, I use a conditional format on the table to change the background colour to red for the row where is not equal to the id passed into ItemMetadata.

    When the form opens, all rows in the table have a red background colour, i.e., no rows have an id which equals the value. 

    I have the ItemMetadata value on the form as well, and I can see it is the same, but the rule thinks that it is not.

    If I copy another row id value to my ItemMetadata element in the form, the rule runs and the item that matches that ID has a white background colour as it now matches.

    If I copy the row ID that should have worked the first time to the ItemMetadat element..it works!  The correct item is hidden.

    If I close and open the form again, copy the value from the table that should match the passed ID, then paste it into the ItemMetadata id field, the rule does not run!  This seems to be because InfoPath thinks that the value did not change, which visually it did not.

    So, why does InfoPath think that the values are not the same when the form loads?  Is it unable to load ItemMetadata.xml quickly enough before it runs the rule or something?  It is very confusing.

    Craig

  • 07-27-2009 09:26 AM In reply to

    Re: conditional format by comparing guids not working

    I modified everything to use ID instead of UniqueId, and it still didn't work.  At least I know it's nothing to do with the guid.

    I wondered if maybe it was because both sides of the condition are in secondary data connections.  I created an XML document and set a value, then consumed a sharepoint list and did the condition.  That worked fine. so I guess it's not that.

    My supposition now is that it something to do with the way SharePoint passes the value to the ItemMetadata XML and/or forms services.

    Ideas appreciated.

    Craig

  • 07-30-2009 06:23 AM In reply to

    Re: conditional format by comparing guids not working

    Well I am stumped.

    Can someone please tell me that they have successfully used conditional formatting on a repeating table in infopath based in a value from ItemMatadata in a workflow task?

    Thanks,

    Craig

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