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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populate fields on sha...
Power Apps
Unanswered

Populate fields on sharepoint list from another list

(0) ShareShare
ReportReport
Posted on by 18

Hey,

 

I've been searching the web all day trying to find a solution but nothing has worked - so now I really need someone's help please.

 

I want to populate several fields on my sharepoint list from another list. For example:

 

List 1 (Cat Services)

 

Columns:-

Cat: (Dropdown field - example: Cat 1, Cat 2 or Cat 3)

Up: (text input - example: 10, 20, 30)

Down: (text input - example: 50, 100, 200)

 

List 2 (User form)

 

Columns:-

User name: <manual input>

Cat service: <Select from dropdown - Values on List 1>

Up: <Auto-populates based on Cat selection - Values on List 1>

Down: <Auto-populates based on Cat selection - Values on List 1>

 

This used to be really simple in InfoPath, but I can't seem to work out the correct formula in PowerApps and you good people are my last hope..

 

Please can someone help me work out what formula I should be using to get this data on here.

 

I've used these formula based on other posts on here - but I get an error on PowerApps stating "Invalid argument type":

 

- If(IsChanged=true,LookUp('Cat Services',Cat=DataCardValue19,Up),Parent.Default)

 

(https://powerusers.microsoft.com/t5/Expressions-and-Formulas/AutoFill-lookup-fields-from-dropdown-list-to-different-list/td-p/78665)

 

-LookUp('Cat Services',Cat=DataCardValue19,Up),Parent.Default)

(https://powerusers.microsoft.com/t5/General-Discussion/Auto-populate-form-fields-from-another-SharePoint-list/m-p/93105#M34897) 

 

 

Thanks for any help you can offer.

Categories:
I have the same question (0)
  • OneThing Profile Picture
    393 on at

    Hi @Jon2,

     

    The easiest way to acheive this is to do a filter on the dropdowns.

     

    for example:

    Cat Service Items: 

    'Cat Services'.Cat


    Up Items:

    Filter('Cat Services',Cat = CatServiceDropdown.Selected.Result).Up

     

    And Down:

    Filter('Cat Services',Cat = CatServiceDropdown.Selected.Result).Down


    I hope this helps as a starter.
    Nicky

  • Jon2 Profile Picture
    18 on at

    Hi Nicky,

     

    Thanks very much for your reply - however that doesn't appear to work.. Clearly there's something I'm doing (or not doing) which is causing these errors.. Can you have a look at the attached screenshots to see the errors I'm receiving - see if there's anything you spot?

     

     

    Thanks,

    Jon

  • Jon2 Profile Picture
    18 on at

    Hi @OneThing,

     

    I've managed to get the dropdown working, I made an error here and the 'Cat' field is actually the 'Title' field, so by using: 

    'Cat Services'.Title

    That seems to populate the dropdown fields.

     

    However, I'm still having difficulty getting the text fields to populate with the data relating to the dropdown selection.

     

    Your suggestion of using:

    Filter('Cat Services',Cat = CatServiceDropdown.Selected.Result).Down

    Results in the 'Invalid arguement' error.

     

    Changing it to the following, stops that error  and gives me a 'Delegation error' - which I apparently should not worry about.. But it's still not auto-populating that field based on the dropdown selection.

     

    I've tried:

     

    Filter('Cat Services','Cat Services'.Title = CatService.Selected.Result).'Cat Services'.PBWD
    
    And
    
    Filter('Cat Services','Cat Services'.Title = CatService.Selected.Result).PBWD
    
    And
    
    Filter('Cat Services','Cat Services'.Title = DataCardValue19.Selected).PBWD
    
    

    Cat Services = list 1 the data is coming from

    Title = Cat (unique name)

    CatService & DataCardValue19 = The field on this form

    PBWD = The field I'm trying to take data from on the 'Cat Service' list

     

    Do you (or anyone else) have any suggestions? I know it's user error - but I can't find a solution anywhere unfortunately.

     

    Thanks,

    Jon

     

  • rebeccas Profile Picture
    2,591 on at

    You just make the defult refer to the field you want to pull in so for List 2 the Cat service default would be=Cat.Selected.Value 

     

    Cat(being the name of the dropdown box not the name of the field)

     

    Then on the Up and Down you can do If Statements for the default value =If(Cat.Selected.Value="Item 1","Text 1"...etc)

     

    Also, make sure you hide or lock those fields if you don't want them being changed by the user.

  • Jon2 Profile Picture
    18 on at

    Hi @rebeccas

     

    Thanks for taking the time to answer.

     

    Using the if statement you mentioned doesn't connect to the list 1 data source, that's where I'm trying to pull the data into these fields. What should I be doing for that?

     

    On another note, I created a field within powerapps for List 2 and called it 'Dropdown2' - the If statement works with that.. However it doesn't work with 'Dropdown1'. 

     

    'Dropdown 1' is my 'Cat service' dropdown field which is pulling the information from the  list 1 data source.. 'Dropdown 2' is not part of my list 2 data. This was so much simplier in InfoPath...

  • rebeccas Profile Picture
    2,591 on at

    @Jon2

     

    Carrying over the field is what ties the two together. 

     

    I come from an Access background so I get wanting to establish a relationship between the two but having a common field that is shared between the two list is all that does it here...I typically use a text field. 

     

    See on the example below (Capture1) I have two forms here and the top in my example is an edit form and the bottom is a new form and it is just carrying down the value of my Serial Number by me putting in the Default for the bottom one = DataCardValue1

     

    I think I wrote wrong if you want to carry over from a drop down...To do that where you want the value to pull into you put on the 'DefaultSelectedItems' = DataCardValue2.SelectedItems and it will pull in that value. See Capture2 for that one. 

     

    See it this helps.

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard