Skip to main content

Search

Populate sub-list item columns with list item column values - When form is saved I need to duplicate some of the list information on to the sub-list information

Comments

3 comments

  • ArdeviaForum

    Original Post by Vladislav (Imported from Ardevia Forum)

    Hi,

     

    Can you explain with more details what does it mean: "it can't find the ID on the sub-list"? What exactly you want to do and for what result you expect?

    0
  • ArdeviaForum

    Original Post by Vladislav (Imported from Ardevia Forum)

    Hay, Sandy.

     

    Thank you for details.

     

    I think the problem is in Update Action in List Item ID Expression. You need to retrieve list items IDs in Sublist with some caml query using Assigment Expression (not just [[ID]] placeholder).

     

    Here is what I tested and it's working for me (I used same field and list names, but you can correct it; title of Sublist is first argument in GetValuesForQuery method):

     

    [[@Web.GetValuesForQuery('invoice-linelist', '<Where><Eq><FieldRef Name="IID" LookupId="True" /><Value Type="Text">[[ID]]</Value></Eq></Where>', 'ID')]]

     

    Also, I think, you will need write some Condition for this Action. Because if it's no items in Sublist you shouldn't run Update action. You can also use such Caml query for Condition in your Update Action:

     

     

    [[@Web.GetValuesForQuery('invoice-linelist', '<Where><Eq><FieldRef Name="IID" LookupId="True" /><Value Type="Text">[[ID]]</Value></Eq></Where>', 'ID')]]

    0
  • ArdeviaForum

    Original Post by Sandy (Imported from Ardevia Forum)

    Awesome, that worked perfectly.

     

    Thank you so much, you're a star.

    0

Please sign in to leave a comment.