Setting a secondary datasource field - InfoPath Dev
in

InfoPath Dev

Setting a secondary datasource field

Last post 09-13-2013 04:20 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-13-2013 01:42 PM

    Setting a secondary datasource field

    I had assistance from QDabra staff yesterday in setting up a form that calculated the difference in value from a meter reading entered today and the reading from yesterday.  The solution pulled in a secondary data source, and set a rule to run after todays meter reading was entered in the form.  The rule checked the last record entered in the sharepoint list (using Max(ID)) and calcuated the value to a field in the primary data source

     After meeting with the departments staff, I found out the value needs to be set on the last record entered of the day before.  So I need to set the value to the last record in the secondary data source, not the primary.

    For example:

    Date Meter Reading Water Treated
    9/10/2013 259,167 754
    9/11/2013 259,921 748
    9/12/2013 260,669 9/13 meter reading value minus 9/12 meter reading value
    9/13/2013 261,250 to be left blank during form entry

    What would be the best way to go after this?  I tried setting the rule to update the secondary dataset, however no filter could be applied.  I created a Form Load rule to filter the table to the current record, however when I try to set the field, the value shows in the form, but not in the list after the form is submitted.

     Using a sharepoint list - infopath form on Sharepoint 2010

    Any suggestions?

     

    Thanks in advance,

    Keith

  • 09-13-2013 04:20 PM In reply to

    Re: Setting a secondary datasource field

     Hi - out of the box, InfoPath is not going to let you set another list item from your list form. And since this is a list form, you can't add code or qRules to do this either. Are you using Office365? If not, you may be able to use the Lists web service and UpdateListItem method with a CAML query to do this.

    Hilary Stoupa

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