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 / lookup control list fr...
Power Apps
Unanswered

lookup control list from sharepoint not alphabetized

(0) ShareShare
ReportReport
Posted on by 21

Hi,

I have a problem in my app with the EditForm generated from a sharepoint list (called 'Hours') in which I have a lookup field based on another sharepoint list 's column (called 'Project') containing the projects' names. The aim  is to select a project from the dropdown list of project names to associate with the work hours that are entered in another datacard. Now, the display of my sharepoint list 'Project' alphabetizes the projects by their name and when I enter work hours in the sharepoint 'Hours', the dropdown list of project names is correctly displayed (in alphabetical order). But when I'm using the app, the dropdown list of project names, in the EditForm of the sharepoint list 'Hours', displays the project list in the order I entered them. Does anyone have any idea on how I can fix this and get the list in alphabetical order?

Many thanks!

Categories:
I have the same question (0)
  • CU11011415-0 Profile Picture
    472 on at

    Hi Shugs,

    If you haven't already, try the Sort function.

    https://powerapps.microsoft.com/en-us/tutorials/function-sort/

  • shugs Profile Picture
    21 on at

    Hi KC,

    I don't have any item field in the EditScreen generated from my sharepoint or in the DataCard or DataCardValue in question. To what should I apply it?  

  • Tom_Slosse Profile Picture
    1,430 on at

    Hey @shugs

     

     

    You could use SortByColumns(<datasource>, "<SharePointFieldToSortOn>", If(SortDescending1, Descending, Ascending))

     

    Hope this helps.

     

    Kind regards

     

     

    Tom

  • shugs Profile Picture
    21 on at

    Hi Tom_Slosse,

    I wanted to use the autogenerated control for this but there is no access to the items. I tried creating a new control in my form and using the formula you mentionned but that is not working either. As I said, the order in the dropdown diplayed in sharepoint is correct but not in powerapp. I'm starting to think this might be a bug.

  • shugs Profile Picture
    21 on at

    Correction : I managed to to sort those by creating a new control. Still interested in finding a solution for the autogenerated controls.

  • shugs Profile Picture
    21 on at

    Still haven't found a solution to my problem : I'll try to rephrase it.

     

    I have an EditForm generated from a sharepoint list Hours. In Hours, I have a Research column which is giving a choice between different project listed in another sharepoint Project. The projects listed in Project are ordered by alphabetical order as well as  in the dropdown list displayed in Hours. Now when I generate an EditForm from this, the dropdown list in the app (DataCardValue) lists the projects by the order in which they were entered in Project.

    The autogenerated dropdown control in the EditForm (DataCardValue), corresponding to the Research column in Hours, doesn't contain any item field allowing to sort the choices, as suggested by @KC and @Tom_Slosse. I tried to work around the problem by inserting a new DropDown control with items sorted from the Project list, but I couldn't figure how to get this accepted in the EditForm for the sharepoint Hours.

    Any help?

  • shugs Profile Picture
    21 on at

    Clearer problem explanation and answer in another post.

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