Forum Discussion

John Condron's avatar
John Condron
Copper Contributor
Jun 19, 2018

Customize List Form to Use Two Lists

Hi, I want to customise a List form to be able to update two lists.  My idea is to create the two lists, Header and Lines.  Then choose customise on the Header List to create the Power App style form.  Then from within that form give the user the opportunity to add items to the Lines List as well.

 

It may work better to create tabs and have Header in one tab, and Lines in another.  But essentially, I want to have a form that when saved will create 1 item in the Header list and multiple items in the Lines list, but linked by the Header List Item ID.  So when the User Edits the Header Item they'll see the associated List items too.

 

I think this should be possible, but my question I guess is pretty much, is there a better way to achieve this?  

 

Hope that all makes sense, and thanks in advance.

 

John

11 Replies

  • Reference Shane Youngs Youtube videos. He's been doing a great job with PowerApp tutorials and this one isn't 2 lists, but it shows working with 2 data sources. Just make them both SharePoint and you should be able to figure it out from this example. He also has others related such as Cascading Drop Downs etc.
    https://www.youtube.com/watch?v=fqH1U0_TanI

    • John Condron's avatar
      John Condron
      Copper Contributor
      That's great, thanks Christopher!

      In the end I used:
      Value(Last(Header).ID)+1 to link the two lists.

      But thanks for the link, the videos are great.

      John
      • Mihir Yelamanchili's avatar
        Mihir Yelamanchili
        Copper Contributor

        Your formula Value(Last(Header).ID)+1  may not work always correct. 

        Example: You have created a header item with id 10. For some reason you/some other person have deleted this item from header list. When you try to add the item to header and lines list through power app, your formula will return you id as 10, which was deleted. So it will fail in this scenario. Is it right!

  • John Condron's avatar
    John Condron
    Copper Contributor

    Ok, hit my first hurdle.  I don't have a Header ID for the Lines because the Header Item doesn't exist yet.  Any ideas anyone?

Resources