Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Lookup columns from Sharepoint issue

Posted on by 122

Hi,

This is my first time using a lookup column type. I have added them to my existing list and it reference another list for a selection of data. I have added it on my app inside the form control. But when i am in New form mode. i don't see the data being listed on the drop down. Works fine within Sharepoint. It does have this formula below on the items section. What can i do to make it work and show the data same as sharepoint?

 

Filter('Listed Items', Title = "Arms")
Categories:
  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Re: Lookup columns from Sharepoint issue

    Hi @powerdevkris ,

    Probably why I mentioned the alternative (change it to a Text field), however if you need to use the Lookup field, there are two things you need to change (using the "looked up" field and the Lookup field names)

    DefaultSelectedItems

    {SecondListField: ThisItem.LookupFieldName.Value}

    Data Card Update

    {
     Value: ComboBoxName.Selected.SecondListField,
     Id: 
     LookUp(
     SecondList,
     SecondListField = ComboBoxName.Selected.SecondListField
     ).ID
    }
     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • powerdevkris Profile Picture
    powerdevkris 122 on at
    Re: Lookup columns from Sharepoint issue

    Thanks @WarrenBelz the second one works for me. I can see my list of data.

     

    How can i still make it work to show the data from my list when i select a record in the gallery? The default = parent.default is not working using this approach.

  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Re: Lookup columns from Sharepoint issue

    Hi @powerdevkris ,

    SharePoint Lookup columns are generally not necessary in Power Apps and will cause you a lot of unwanted restrictions and complexity, particularly if you start changing the Items on the Combo Box. Normally the Items would be (if you want to reference the lookup column values)

    Choices(YourSPListName.YourLookupColumnName)

    The easiest way (without the lookup column) is to simply reference the other list directly

    SecondListName.LookupUpFieldName

    and then write back to a Text field.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard