locked
workflow to update parent list field from a child list field value RRS feed

  • Question

  • hi all

    I've got two lists, a parent and child with a 1 to many relationship. Whenever anyone creates a record in the child list, that record will contain a numeric value that i want to add to a 'total value' field in the parent list. Can I do this in a workflow?

    best wishes


    Dave

    Sunday, January 6, 2013 2:47 PM

Answers

All replies

  • Yes, you can do this with a workflow on the child item.

    1. set workflow variable. (make a number variable that looks up to the parent list, and brings back your numeric value, which will now be stored as a variable, call it ParentNumeric or something.)
    2. Do calculation (add the number in your variable to the numeric value in the current item, which spits out a new variable, call it TotalCalc or something)
    3. Update list item (set the numeric value in the parent item to TotalCalc value)

    Laura Rogers
    Rackspace: SharePoint Consulting
    Blog: http://www.wonderlaura.com
    Twitter: WonderLaura
    Books:Beginning SharePoint 2010: Building Business Solutions with SharePoint
    Using InfoPath 2010 with Microsoft SharePoint 2010 Step by Step

    • Marked as answer by Dave Papworth Thursday, January 10, 2013 11:07 AM
    Monday, January 7, 2013 4:28 AM
  • Great stuff working fine now, thank you laura
    Thursday, January 10, 2013 11:07 AM
  • Hi, Laura

    That's what I'm trying to accomplish, but got stuck at "set the value in the parent item to workflow variable", it sounded like a silly question, I cannot find the action to do it

    Thanks

    Wednesday, January 30, 2013 7:21 PM
  • Never mind, I got it!

    Thanks

    Thursday, January 31, 2013 1:10 AM
  • Laura,

    I realise this enquiry is a few years old now but I have follow-on question that relates to your response. Is it possible to achieve the same thing but having the two lists in different (parent and child) sites?

    To explain further: I have a list in the parent site with each entry relating to a unique sub-site. When an entry in a list in the sub-site is changed I would like the change to be reflected in the list of the parent site. This may appear to be a convoluted scenario but the configuration is dictated by a security policy we are trying to ensure.

    Ideally would would like to restrict the solution to a workflow but suspect PowerShell or JavaScript code may be necessary.

    TGJ Gilmore

    Wednesday, November 8, 2017 9:11 AM