Insert new line in Repeating table should copy 1 fields value from Top Row - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Insert new line in Repeating table should copy 1 fields value from Top Row

Last post 11-02-2018 03:36 PM by Hilary Stoupa. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 11-01-2018 04:18 AM

    Insert new line in Repeating table should copy 1 fields value from Top Row

    All, I appreciate your support in advance I have 2 Lists in SharePoint e.g. A ParentList and a ChildList. ChildList is connected to ParentList using a Lookup Field. I have customized NewItem form of ParentList in InfoPath, which is Main data connection. Secondary Data source is added to form which is ChlidList. So on form user can submit record in ParentList using Submit Parent Button, after submit same process retrieves latest ID from ParentList and displays it in 'a column' of '1st row' of ChildList Repeating table. Issue is when I insert next row(s) i want the ID value which displayed on 1st Row of Repeating table should be copied in 2nd row for same column. To achieve this i tried to use below but it gives me error. ../preceding-sibling::my:SharePointListItem_RW[5]/my:Parent Risk ID - (Parent Risk ID is Lookup column in ChlidList where i display ID value of ParentList) Error as below Expected value type: end-of-string Actual value: name ../preceding-sibling::mySharePointListItem_RW[5]/my:Parent-->Risk
  • 11-01-2018 12:48 PM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    May I see a copy of your form? You can attach it under the Options tab in a reply.
    Hilary Stoupa

  • 11-02-2018 02:00 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Thanks Form screen shot is attached now. I have highlighted the Parent Part of form and Child Form. Also i have captrued it when 1st row is with data where ID field has value. So when i insert 2nd row in table, i expect that last ID column should be auto populated using 1st row's value.
  • 11-02-2018 06:01 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Hi Just an additional observation When i try to use ../preceding-sibling::my:SharePointListItem_RW[5]/my:Parent Risk ID - I get Error as Expected value type: end-of-string Wehn i try to use ../preceding-sibling::my:SharePointListItem_RW[5]/my:ID - I don't get above error. Both are valid columns in my ChlidList. It means it gives me error if i use a column name having 'Space'. I hope i could explain my main requirement clearly now that on my form i have Repeating Table for ChlidList where in 'Parent Risk ID' column i populate a value from my ParentList last Record. So now when i add new row in Repeating table, it should copy same value of 'Parent Risk ID' from 1st Row. Solution either using above command of Preceding-sibling or any other way will be appreciated.
  • 11-02-2018 07:50 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Could I see the actual form, not just a screenshot?
    Hilary Stoupa

  • 11-02-2018 08:37 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Please let me know How can i share it?
  • 11-02-2018 08:39 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Hi I have now attached actual .xsn file
  • 11-02-2018 09:26 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Have you tried: ../preceding-sibling::my:SharePointListItem_RW/my:Parent_x0020_Risk_x0020_ID for the default value?
    Hilary Stoupa

  • 11-02-2018 11:53 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Its perfect now !! Thanks a lot for accurate solution :) Now field value getting copied correctly as expected :) With respect to this form i have one different query. Can i ask it here or do i need to write it in new forum?
  • 11-02-2018 11:58 AM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Ask away - here is fine. :)
    Hilary Stoupa

  • 11-02-2018 02:00 PM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Great Thanks :) As said i have 2 Lists i.e. ParentList and ChlidList for which i have 2 forms customized in InfoPath. One i have attached earlier i.e. ChildList form. In SharePoint on ParentList form, ChlidList form is embaded as WebPart. (Please check 1st Screen shot which i shared earlier) In ParentList form i add a Record and click on Submit button, where record gets added in ParentList. Then on same form we have ChlidList form, where another button i.e. Set Risk ID. when user clicks it, it retrives latest max(ID) from ParentList and display it on last column of ChildList form. So currently i submit Parent record first and then using 'Set Risk ID' button i retrive latest Parent ID and set it in ChildList column. I want that when i click on Submit button it should add record in Parent List and also retrive latest ID from Parent and display it in ChlidList last column. So i want to remove 'Set Risk ID' Please note both the forms are different but embaded on single form where i add Parent List record first and then Child List record and its embaded using webPart.
  • 11-02-2018 02:02 PM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Attached is ParentList form.
  • 11-02-2018 02:07 PM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    I don't know of a way to do that. This blog post may give you some things to try? https://blogs.msdn.microsoft.com/infopath/2010/06/03/how-to-pass-querystring-data-into-an-infopath-form/
    Hilary Stoupa

  • 11-02-2018 02:18 PM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Okay Thank, Just to give you a short clue what exactly need to be done here. On a SharePoint form from WebPart-1 Submit Button i have to set fields value of a field on WebPart-2
  • 11-02-2018 03:36 PM In reply to

    Re: Insert new line in Repeating table should copy 1 fields value from Top Row

    Sure, I understood your description. It just isn't something I've ever implemented, thus I don't have an answer for you on how to implement it.
    Hilary Stoupa

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