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 / Retain a dropdown box ...
Power Apps
Answered

Retain a dropdown box selection when outside delegatable range

(0) ShareShare
ReportReport
Posted on by 377

Hi there

I am having issues with a custom form in sharepoint.  I have a dropbox making a selection from a list of over 2000 items.  I have a searchbox to filter the items so I can get want I want.  

Filter(HOSTFAMILIES, StartsWith(Title, HostSearchBox.Text))

When I edit an item and make a selection it updates in sharepoint OK.  When I open the item up again in the customised form, if the selected dropbox item is outside the delegatable range it defaults back to the first item in the lookup list.  If I have selected an item within the delegatable range then it holds. 

My default on the dropbox is ThisItem.HostTitle (which is the name of the card with the dropdown)

 

So what I want is the dropbox selection to retain whatever I select even if it is outside the unfiltered delagatable range.  I think its simple but I cant work it out.  Thanks

 

 

 

 

Categories:
I have the same question (0)
  • KrishnaV Profile Picture
    5,023 on at

    Hi @StuCundy ,

     

    In PowerApp only a very few functions are delegable and the list of them are:

    https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

     

    coming to losing the context of the dropdown we need to change the value from ThisItem.HostTitle to Lookup(datasource,<< Condition>>).

     

    I hope this resolved your issue if you see any challenge let me know I am always happy to help.

    Regards,

    Krishna

    If this post helps, then please consider Accept it as the solution and give thumbs-up to help the other members find it more.

  • StuCundy Profile Picture
    377 on at

    Hi @KrishnaV 

    i did enter the following in the default of the dropdown box

    LookUp(HOSTFAMILIES,Title=ThisItem.HostTitle,Title)

    however I have the same result.  the selection doesn't hold as it is outside the first 200 items.   I wonder if this is where I need to have a dropbdown box using a distinct function? will that help hold the selection?

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

    Hi @StuCundy ,

    Yeah, you are right. Currently, there is an known limit with the Dropdown control -- it could only show a maximum of 500 items. If you select a option outside this limit, the stored option would not be displayed within this Dropdown box.

     

    As an alternative solution, please consider add a ComboBox (ComboBox1) inside the HostTitle field data card instead of the Dropdown control to list available options. Set the Items property of the ComboBox to following:

    HOSTFAMILIES

    specify the Title field as Search field and Primary Text within this ComboBox.

    Set the SelectMultiple property of the ComboBox1 to following:

    false

    set the DefaultSelectedItems property of the ComboBox1 to following:

    {
     Title: ThisItem.HostTitle
    }

     

    set the Update property of this HostTitle field data card to following:

    ComboBox1.Selected.Title

    Note: I assume that the HostTitle field is a Text type column in your SP List.

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • StuCundy Profile Picture
    377 on at

    Hi @v-xida-msft and @KrishnaV 

     

    I have created the combo box as you suggested and followed the instructions.  I agree its a better option for me but I still cannot get records outside the 2000 range.  So I will add a second dropbox or combo box to get Distinct() to filter the number to a smaller group.

    The problem I have now is that the Choice type field I want to use the Disctint () on does not appear in my list of available fields.  Infact no choice type fields appear in the available fields for the combobox to use.  Will I have to change the nature of that field?

    choice.png

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

    Hi @StuCundy ,

    Could you please share a bit more about the "Owner" field? Is it a Choice type column?

     

    If you want to display distinct Choice type field values within the Dropdown box or ComboBox, please take a try with the following workaround:

    Set the Items property of the Dropdown box or ComboBox to following:

    Distinct(HOSTFAMILIES, Owner.Value)

     

    If you want to display a distinct Text type field values within a Dropdown box or ComboBox, please set the Items property to following:

    Distinct(HOSTFAMILIES, TextTypeColumnName)

    If you want to display a distinct Choice type field values within a Dropdown box or ComboBox, please set the Items property to following:

    Distinct(HOSTFAMILIES, ChoiceTypeColumnName.Value)

    Note: Please type above formula within the Items property of the Dropdown box or ComboBox directly, rather than use the "Depends on" option of Dropdown box or ComboBox.

     

    Please take a try with above solution, then check if the issue is solved.

     

    Best regards, 

  • StuCundy Profile Picture
    377 on at

    Hi @v-xida-msft 

    Thanks for your assistance.  Yes the Owner field is a choice type in the SP list "HOSTFAMILIES"

     

    I have tried the workaround without success.

    Distinct(HOSTFAMILIES, Owner.Value)

    This issue I have is that no choice columns appear in the datasource. see pic

    Note : I have over 10 choice columns in this list, none of which show here.
    nochoicecolumns.png

    So I'm assuming that's for a reason, maybe its a choice trying to choose a choice.  So any way using your suggestion gave blank results.

     

    So just to clarify, the custom form and datasource in the form is for the list "LongTermStudents"  In "LongtermStudent" I have column "HostTile" (Single line of Text type) which I want to select the host from SP List " HOSTFAMILIES" using Title  (being the unique identifier)

    Note: yes I also have HOSTFAMILIES data source in the form but the actuall Edit Form data source is "LongTermStudents"  Is this where I have gone wrong.  Maybe I need to have a second column in "LongTermStudents" showing Owner?

     

    What is kind of working...

    In my custom form I have put the following in the OnVisible property of the screen containing the form;

    ClearCollect(ColHostOwner, {Result: "Select Host Owner"});
    Collect(ColHostOwner, Distinct(HOSTFAMILIES,Owner.Value))

    Giving me a Distinct list of the owners.  This works.

     

    I can then select a HostTitle

     

    So the question I have is what different senario would your workaround work?

    Do you know why the choice fields do not show in the field option of the ComboBox in this situation

    lastly how do I keep the default selection of ComboBox showing the Owner options?  Or as I now have a collection I cant as it clears each time the app is closed

     

    Thanks so much for your help and I hope I make sense.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @StuCundy ,

    I have made a test on my side, and don't have the issue that you mentioned. The Distinct formula works well on my side. Please set the Items property of the Dropdown box or ComboBox to following:

    Distinct(HOSTFAMILIES, Owner.Value).Result

    or

    Split(
     Concat(
     HOSTFAMILIES,
     Owner.Value & ";"
     ),
     ";"
    ).Result

    Note: When you apply above formula within the OwnerComboBox, you could only select Result property under the OwnerComboBox. In other words, in Primary text or SearchField of the OwnerComboBox, you could only select Result property.

     

    I also agree with your solution almost, you could save the Distinct formula result into a collection, then apply the collection to your OwnerComboBox.

     

    If above formula could achieve your needs, or you have solved your problem, please go ahead to click "Accept As Solution" to identify this issue has been solved.

     

    Best regards,

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard