Form rule does not work when deployed to SharePoint 2010 - InfoPath Dev
in

InfoPath Dev

Form rule does not work when deployed to SharePoint 2010

Last post 01-14-2015 08:50 AM by paldrich87. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-12-2015 01:54 PM

    Form rule does not work when deployed to SharePoint 2010

    Hi, I have a form with several fields, then a Complete button, then a hidden field. I have a rule where, when the button is clicked, it should set the hidden field's value to 1. The field is just a textbox with a default value set to a metadata item (ows_Result). So the rule is actually setting the value of that metadata item to 1, which should go through to the textbox. This rule works fine in Infopath Designer preview, but does not work at all when deployed to SharePoint (as part of a feature, bundled with a workflow). In Infopath designer (2010), in preview mode, the hidden field (which I have made unhidden for troubleshooting purposes) shows a default value of 0 (which is set in the ItemMetadata.xml), and the value changes to 1 when Complete is clicked. In the SharePoint task form, this field starts out completely blank –and clicking complete does not set it to 1. This is a problem since the workflow code cannot read the value and make a decision. Things I have tried: * Setting the field's postback value to Always * Setting the button's postback value to Always * Deleting and recreating the button with the same logic Can you give me a few tips on what to try from here? Thanks. EDIT: I’ve found that the issue only occurs if the field’s value is set to an item metadata field (i.e. ows_Field) and the rule tries to update that field (updating the textbox value works fine when deployed to SP). It seems this value is not getting persisted. How do I persist this value to item metadata?
    Filed under:
  • 01-14-2015 08:50 AM In reply to

    Re: Form rule does not work when deployed to SharePoint 2010

    Okay, I was just pulling the value wrong in the workflow code. I was using: tskCreate.TaskProperties.ExtendedProperties["prop"] I should have been using onTaskChanged_AfterProperties1.ExtendedProperties["txtField"] Since the Submit was sending the form data back to the workflow code; I set my hidden field to 1, which "changed" the form.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.