Writing Data From Repeating Table (secondary data source) back to SharePoint - InfoPath Dev
in

InfoPath Dev

Writing Data From Repeating Table (secondary data source) back to SharePoint

Last post 06-16-2011 02:31 PM by chasquad. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 06-15-2011 12:07 PM

    Writing Data From Repeating Table (secondary data source) back to SharePoint

    It seems simple, but here it goes ...

     I have a IFS 2010 form with qrules that submits to a SharePoint 2010 Form Library.  I have a secondary data source (ShaerPoint 2010 List) in the form that populates a repeating table in the form with the data from the secondary data source.  I would like for each employee who opens the form to be able to modify the information in the repeating table and then click a button to send the modified data back to the SharePoint 2010 list.

    I thought that the SubmitToSharePointList qrules would do this, however this is a repeating table that is a secondary data connection and not a main data source.  Thus, I am not able to use the SharePoint List Tool to map the xml.

    Ideas?

  • 06-15-2011 12:38 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    Can you use CopyTable to move the data from the 2ds to the main DOM and then have the mapping submit from the main DOM to the SharePoint list?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-15-2011 02:44 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    I tried the copytable command, but being my first time using it, I probably did not do it right.  I attached the template to this reply.  Basically, if I understand you correctly, the user would click the button and that would send the data from the first repeating table to a second one that is in another view.

    First Repeating Table:  Secondary Data Source

    Second Repeating Table:  Main data source

    Command:  CopyTable /tablesrc=/dfs:myFields/dfs:dataFields /rowsrc=/d:SharePointListItem_RW /tabledest=/my:myFields/my:group1 /rowdest=/my:dpAWHGroup

  • 06-15-2011 05:51 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    Because your source is coming from a secondary data source, you'll need an additional parameter: dsnamesrc. Can you modify your command and try it again?

    Also, when working with qRules we suggest you display the error, result and success nodes somewhere (for example, a view called Debug) so that you can see the errors and messages returned by your commands.

     

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-15-2011 06:27 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    I get an error now.  "Trial has passed the expiration date.  Please contact Qdabra Software"

    I got an email today from our Technology Purchasing dept that indicated that a PO had been issued for the purchase, but I did not hear back anything else from them.  I guess I'm dead in the water until they tell me where the purchased license is.  Thanks.

  • 06-16-2011 12:41 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    Alrighty ... now that the licensing issue is resolved I was able to retest the form after adding the dsnamesrc value:

     Command:  CopyTable /dsnamesrc=ACTWorkHistoryRetrieve /tablesrc=/dfs:myFields/dfs:dataFields /rowsrc=/d:SharePointListItem_RW /tabledest=/my:myFields/my:group1 /rowdest=/my:dpAWHGroup

     Result:  <null>

    Success:  false

    Error:  Failed to select the source row to copy from.

     Sometimes a picture is worth a 1,000 words, so I've attached a pic of the source secondary data connection


  • 06-16-2011 01:17 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    I don't see a data source named "ACTWorkHistoryRetrieve" in your form. I do see the xpath /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW so that portion of the command looks ok.

    After that you might run into an issue making sure that the fields match. See the attached screenshot; you might need to reorganize some fields.


    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-16-2011 01:56 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    Thanks

     I reordered the fields to match.

     The secondary data connection ACTWorkHistoryRetrieve used to be called "ACT Work History retrieve" but I renamed it to remove the spaces.

    Could this be causing the issue?  Should I use the old name with the spaces in the Command?  If so, do I need to put quotes around the name?

  • 06-16-2011 02:03 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

     Ok, so if the DS name was changed maybe that's not the issue.

    Can you try this?: CopyTable /dsnamesrc=ACTWorkHistoryRetrieve /tablesrc=/dfs:myFields/dfs:dataFields /rowsrc=d:SharePointListItem_RW

    (no leading slash in /rowsrc)

    Any changes in the error message?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-16-2011 02:31 PM In reply to

    Re: Writing Data From Repeating Table (secondary data source) back to SharePoint

    Perfecto!  Thank you!  Now I can move forward a bit.
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.