Updating an item in an unrelated list - InfoPath Dev
in

InfoPath Dev

Updating an item in an unrelated list

Last post 03-19-2011 08:15 AM by qwerty. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-09-2011 05:27 AM

    Updating an item in an unrelated list

    Hi,

    Is it possible to update a field in an unrelated list if i have the ID to the item that i'd like to update?
    If this is possible, please let me know what my options would be to enable this.

    I have successfully pulled the ID of the unrelated item into the form.  My issue is not knowing how to
    change the field, say <Field1> within the unrelated list, even if i have the ID for the unrelated item.

    Welcome your thoughts.

  • 03-10-2011 08:49 AM In reply to

    Re: Updating an item in an unrelated list

    Hi,

    Yes, you can do that.  The key of course is knowing the ID so you can update the right row in the list and you have figured that out.

    To update the list though will require code.  You can either write your own code to do this or use a tool like our qRules product which has several commands to work with SharePoint lists from your form including the ability to write to SharePoint lists and even the ability to update your InfoPath form if the list gets edited in SharePoint.

    You can find out more about qRules here: http://www.qdabra.com/en/products/qRules.aspx

    Next week we will be offering a free 1 hour webinar on qRules, let me know if you want to know more about this.

    Ted

  • 03-19-2011 08:15 AM In reply to

    Re: Updating an item in an unrelated list

    Hi noppojp (this is a little late, I know).

    Actually this can be done without code. First, add an extra column to your unrelated list -- you will probably have to do this in your database, and call the field in it @change (or anything else). Give it an integer datatype by doubleclicking on the field and changing the selection that says Text (string) to Whole Number (integer).Then add another field outside of the list in your datasource, called @current. Give it an integer datatype too. Then, add a button to your form, and add the following rules, in order, to it: Set a field's value: @current = <ID of Row to Get>, and Set a field's value: @change = @change + 1.

    Finally, add a rule to @change: If <ID of Row> is equal to @current, THEN: Set a field's value: <Field to Update> = <Value to Change it T>.

    Have a great day and I hope this helps!

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