web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Linking and updating t...
Power Apps
Answered

Linking and updating two sharepoint list

(0) ShareShare
ReportReport
Posted on by 223

Good day guys, I have 2 SharePoint list namely "Funding activities" and Unit as shown below.

 

Activities.pngUnit.png

 

I have a gallery that contains the funding activities and a drop-down that contains the Unit as shown below.

filter.JPG

 

I would like to filter the gallery (where the related column name is UnitID) based on the drop-down (Unit) where the related column is "ID" . And secondly, i want to be able to create new activities based on the Unit on a New form or gallery (whichever works)?

Thanks.

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @caslasgee,

    Modify your formula as below:

    Filter('Funding activities',UnitID=LookUp(Unit,Unit=dd_control.Selected.Unit).ID)

    Note that I refer to dd_control.Selected.Unit, which depends on how you set the Items property of the dropdown control, if the formula you set to Items property returns Unit, then you need to refer to Unit, if it returs a column named Value, then you need to refer to dd_control.Selected.Value

     

    To create new activities based on the Unit, I think you need to add a Form control, and set the following properties.

    1). Add a button and set its OnSelect as:

    NewForm(Form1)

    2). Set the Item property of the Form1 as:

    Gallery1.Selected //For editing an existing record from the gallery

    3). Add a submit button and set its OnSelect as:

    SubmitForm(Form1)

    4). Remember to link the form to your activities list and add the fields.

     

  • caslasgee Profile Picture
    223 on at

    Thanks @v-qiaqi-msft , That Works. Still trying to figure out how to display the Unit from the unit table in the edit form of the activities after you click on edit and it takes you to the form. See image below, thanks.

     

    After selecting the edit icon, It takes you to the edit page with contains the activity.mod.JPG

     

    I want to also show the Unit beneath the edit activity in the form and while submitting the update. Same applies to an instance where one wants to add a new activity against an existing Unit. Thanks.

    mod2.JPG

  • caslasgee Profile Picture
    223 on at

    Hi @v-qiaqi-msft , Thanks. I was able to sort the form modification out. If i want to submit a new activity under a unit how do i go about this. I have created a new form as shown below. I have also shown the list of Units from the SharePoint list (Funding Unit) in a Drop down and also added an input text label to accommodate the New activities and finally, added a button. How do i patch this through considering that the entries are going into different SharePoint list.

    Thanks.

    new.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard