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 / Collection lookup has ...
Power Apps
Answered

Collection lookup has stopped working

(0) ShareShare
ReportReport
Posted on by 364

Evening all,

 

A collection lookup has randomly stopped working today. 

 

The collection is a local version of a sharepoint list, filtered by whichever department the current user is a part of. It holds academic unit names, and their codes. When the user selects a unit from a dropdown, the unit code should be automatically populated in the list, but as you can see below, there is nothing appearing:

 

Capture.PNG

 

The code for the lookup is: 

LookUp(ahUnits,'UE - Dd - Unit Name'.Selected.Unit_x0020_Title=Unit_x0020_Title,Unit_x0020_Code)

 

I can see that the collection is there, and populated. The fields I need are all there with the correct name, but it just randomly has stopped working. 

 

The collection is gathered on appStart. 

 

As a test, I circumvented the collection and pointed the lookup directly at the SharePoint list, and that works fine. It just seems to be the lookup against the collection. I have also tried storing the list in a global variable as well, but still nothing. 

 

Any help?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @EpicTriffid 

    If you are using lookup for the textinputbox to show the code for the selected Item in the dropdown, I think you are overthinking the problem.  A dropdown holds an entire record but only shows one field in the window.  However, you can reference every field in the record shown in the dropdown simply by setting the Default field of the TextInput box to reference the field other than the one displayed in the dropdown as follows:

     

    Dropdown1.Selected.MMUid

     

     Likewise you could use a label control to show the same data by setting the Text property to the above.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @EpicTriffid ,

    Please note that the action of app.onstart only perform when the app starts running.

    It will not run again when you play the app.

    I suggest you populate the collection again by setting the drop down's OnChange, which will update collection every time you select section in the drop down.

    I also suggest you check whether there's one record meet the condition.

    You could use this to check:

    If(!IsEmpty(Filter(ahUnits,'UE - Dd - Unit Name'.Selected.Unit_x0020_Title=Unit_x0020_Title),true,false)

    If the result is true ,then there's record meeting the condition.

    If the result is false, then there's no record meeting the condition.

     

     

     

    Best regards, 

  • EpicTriffid Profile Picture
    364 on at

    Thank you for your response!

     

    Unfortunately, it comes up with a "Name isn't valid" error when i try to get the unit code. I think it's because my dropdown (which is a combobox) is filtered, sorted and put into a Proper text format:

     

    Sort(Proper(Filter(ahUnits,Department = currentDept).Unit_x0020_Title),Unit_x0020_Title)

     

    I can only assume I have essentially stripped the record of anything other than the unit title. Any idea how to get around this?

  • Verified answer
    EpicTriffid Profile Picture
    364 on at

    I discovered the problem. 

     

    The collection itself was working, but the use of the Proper function was stripping out the Title from the rest of the record. Sort and Filter work fine, and return the whole record for me to get my Unit Code from, the code of which I took from @Drrickryp's suggestion. Removing Proper, and instead formatting the base data in the lookup worked. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard