cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Managed metadata dropdown - display and filter more than first 20 items

Hello everyone,

 

I'm working on a PowerApp for one of my customers and have stumbled upon a weird problem. The PowerApp is connected to a SharePoint list which has a couple of Managed Metadata columns. When adding these fields to the PowerApp form, the possible values are automatically added through the following function for the "Items" property:

 

Choices([LISTNAME].COLUMNNAME)

 

However, when testing my form through the "Preview" function or even the "Published" form in SharePoint, the dropdown only contains the first 20 items from my term set. This term set contains more than these 20 items, and I can only reveal the others when typing in the search box (searching for them).

 

E.g. my dropdown initially contains the following values (visible for end user):

 

- 1.1

- 1.2

- ...

- 1.19

- 1.20

 

It does not display value "1.21", even though it exists in the term set.

 

After typing "1.2" in the dropdown search box, the following values are visible:

 

- 1.2

- 1.20

- 1.21

- ...

- 1.28

- 1.29

 

So the typing (searching) in the dropdown does work correctly. However, the problem lies with the initial (lack of) display of all possible values.

 

Is there an option for me to increase this amount of values that is displayed in the dropdown to e.g. 500 instead of only 20?

 

For another request of my customer, I have to set the default values for these Managed Metadata fields, depending on the value of another field on the form. This works just fine for the first 20 values of the term set, however filtering for e.g. the 25th value of the term set doesn't seem to work.

This next snippet works fine because the element I'm filtering on is part of the first 20 values in the term set:

 

Filter(
   Choices([LISTNAME].COLUMNNAME),
   Label = "1.5"
)

 

This next snippet doesn't work because the element I'm filtering on is not part of the first 20 values in the term set:

 

Filter(
   Choices([LISTNAME].COLUMNNAME),
   Label = "1.25"
)

 

 

Is there an option for me to filter through ALL possible values of the term set, instead of just the first 20 possible values?

 

Any help is greatly appreciated!

 

Kind Regards,

Robin

6 REPLIES 6
Microsoft
Microsoft

Hello @RobinS 

 

Hope this can help you, Have you try to collect first the lookup values on a collection? after that, put that collection on the combo box, is this possible for your business requirement.

 

Best regards, Pablo.

Hello Pablo,

 

I tried using the "ClearCollect" and "Collect" functions, but you need to pass the "Choices" to this function first. It appears that the "Choices" function is limited to a maximum of 20 items.

Am I doing something wrong? If so, could you send me the code that I should use? Do you have any other ideas?

 

Any help is much appreciated!

 

Kind Regards,

Robin

Frequent Visitor

Hi RobinS,

I am having the exact same issue, did you ever find a solution to this?

 

We have a managed metadata column in SharePoint that we are trying to filter on but are having the same issue with only the first 20 results being returned. It would appear this is a limit on the "Choice" function?

 

I hope to hear from you! 🙂

Hello Alan,

 

Unfortunately I wasn't able to find a complete fix for the issue; it appears that indeed the "Choice" function is limited behind the scenes and there's no apparent way to solve this.

 

I used a "dirty fix" work-around for my customer, as the data in his managed metadata column rarely ever changes. Here's a screenshot of the root terms and some of its childterms so you have an idea of the data values:

Screenshot 2020-11-10 123435.png

 

In the "OnStart" function of my "App" in PowerApps, I added the following lines of code (not pretty):

ClearCollect(CRS,[]);

Collect(CRS, FirstN(Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.1"),1));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.1.1"));
Collect(CRS, FirstN(Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2"),1));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2.1"));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2.2"));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2.3"));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2.4"));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2.5"));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.2.6"));
Collect(CRS, FirstN(Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.3"),1));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.3.1"));
Collect(CRS, Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "3.3.2"));
Collect(CRS, FirstN(Choices([@Documenten].CR_x0020__x0028_OECD_x0029__x0020__x0028_1_x002d_2_x0029_, "NA"),1));

You can then set the "Default" function of your managed metadata dropdown control to this "CRS" collection.

 

Like I said, it's not pretty, and not at all exhaustive (though I assume you could write some looping mechanism) but it's what solved the issue for this specific customer.

 

Hope it helps in any way, and I also hope Microsoft attends to this issue so that it's increased to at least 5000 items in the near future!

 

Kind Regards,

Robin

I  am having the same issue,  managed metadata does not display more than 20 items. Please let me know if you have found a fix. Your workaround does not work for me.

 

Thanks

Post Patron
Post Patron

Wow, yet another MSFT  GOTCHA!! SURPRISE!!!

I was looking for the same answer even though I figured it would be fruitless. Hey at least we have 3D and A.I. plus connections to Trello. That's a good thing since we use THAT everyday.

Does anyone know if there's ANYTHING in the MSFT arsenal that actually does work according to expectation and comes without excuses about timing, data, it's new or or, oh yes, it's COVID's fault.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (38,746)