cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GrahamB
Level: Powered On

Display managed metadata + parent terms in drop down

Hello,

 

I am looking to display a list  of managed metadata terms in a dropdown in a Power App I am working on and would be grateful for the community's help with this..

 

The terms I am looking to display are lessons learned category. Each selectable term is a child of another term which is not itself selectable.

Lessons Learned Category.png

I am keen for my dropdown to display each selectable term whilst also making clear which wider category the term belongs to. e.g.

  • Software - Configuration
  • Software - Feature Requirement

 

 

At present I am using the Choices function to retrieve the terms as follows:

Choices('Lessons Learned'.Lessons_x0020_Learned_x0020_Cate)

Lessons Learned Question.png

This is successfully retrieving the terms but displays them with the GUID next to it.

 

Please could I ask;

  • Is there a way to display just the term name in the dropdown?
  • Is there a way to also specify the inclusion of parent terms in the string? (e.g. Software - Configuration)

I suspect I may need to setup a collection but am not certain and would appreciate folks' advice on how to proceed.

 

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Display managed metadata + parent terms in drop down

Hi @GrahamB,

Do you want to specify the inclusion of parent terms in the string within the Drop down?

 

For your first question, if you just want to display the term name in the dropdown, I have made a test, please take a try with the following workaround:

Set the Items property of the Drop down control to following formula:

 

Choices('20181015_case3'.Lessons_x0020_Learned_x0020_Cate).Label

On your side, you should type following:

 

 

Choices('Lessons Learned'.Lessons_x0020_Learned_x0020_Cate).Label

 

For your second question, if you want to specify the inclusion of parent terms in the string within the Drop down, I have made a test, please take a try with the following workaround:1.JPG

Set the Items property of the Drop down control to following formula:

AddColumns(
Choices('20181015_case3'.Lessons_x0020_Learned_x0020_Cate),
"ParentTermString",
If("/" in Path, Concatenate(Last(Split(Path,"/")).Result," - ",Label),Label)
).ParentTermString

On your side, you should type the following:

 

AddColumns(
Choices('Lessons Learned'.Lessons_x0020_Learned_x0020_Cate),
"ParentTermString",
If("/" in Path, Concatenate(Last(Split(Path,"/")).Result," - ",Label),Label)
).ParentTermString

The screenshot as below:2.JPG

 

Best regards,

Kris 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Community Support Team
Community Support Team

Re: Display managed metadata + parent terms in drop down

Hi @GrahamB,

Do you want to specify the inclusion of parent terms in the string within the Drop down?

 

For your first question, if you just want to display the term name in the dropdown, I have made a test, please take a try with the following workaround:

Set the Items property of the Drop down control to following formula:

 

Choices('20181015_case3'.Lessons_x0020_Learned_x0020_Cate).Label

On your side, you should type following:

 

 

Choices('Lessons Learned'.Lessons_x0020_Learned_x0020_Cate).Label

 

For your second question, if you want to specify the inclusion of parent terms in the string within the Drop down, I have made a test, please take a try with the following workaround:1.JPG

Set the Items property of the Drop down control to following formula:

AddColumns(
Choices('20181015_case3'.Lessons_x0020_Learned_x0020_Cate),
"ParentTermString",
If("/" in Path, Concatenate(Last(Split(Path,"/")).Result," - ",Label),Label)
).ParentTermString

On your side, you should type the following:

 

AddColumns(
Choices('Lessons Learned'.Lessons_x0020_Learned_x0020_Cate),
"ParentTermString",
If("/" in Path, Concatenate(Last(Split(Path,"/")).Result," - ",Label),Label)
).ParentTermString

The screenshot as below:2.JPG

 

Best regards,

Kris 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
GrahamB
Level: Powered On

Re: Display managed metadata + parent terms in drop down

Hello Kris,

 

A massive thank you for your help with this. I used your suggested formula and can confirm that this has indeed provided me with the terms showing as desired.

 

I have found that making this change has triggered an issue with my gallery filtering though.

 

I currently have four boxes I am using for filtering; Project Number, Lesson Title, Project Site and Lesson Category and was using the following formula to filter the gallery successfully by looking to match based on the TermGuid:

 

Filter('Lessons Learned', StartsWith(Title,Textbox_Lesson_Title.Text), StartsWith(Project_x0020_Number, 
Textbox_Project_Number.Text),Project_x0020_Site_x0020__x002f_.TermGuid in ComboBox_Project_Site.SelectedItems.TermGuid ,
Lessons_x0020_Learned_x0020_Cate.TermGuid in ComboBox_Lesson_Category.SelectedItems.TermGuid)

 

Please could I ask if you have any thoughts on what I might need to do in order to get this gallery search working again?

 

I'm very happy to provide any further information that might be of assistance.

GrahamB
Level: Powered On

Re: Display managed metadata + parent terms in drop down

@v-xida-msft I should have @ mentioned you in my reply above on this issue.

 

Thank you again for all your help so far.

asadrajput
Level: Powered On

Re: Display managed metadata + parent terms in drop down

Hi

I am trying to make this work in our environment but I get the error:

 

"The speocified column Label does not exist"

 

AddColumns(
Choices(BCSTest.TermCol1),
"ParentTermString",
If("/" in Path, Concatenate(Last(Split(Path,"/")).Result," - ",Label),Label)
).ParentTermString

 

Issue PowerApps.png

richardB1
Level: Powered On

Re: Display managed metadata + parent terms in drop down

I know this response is a bit late, but I've just been setting this up myself. If you are following this formula for Items, then you will need to change the DisplayFields/SearchFields to ["ParentTermString"] to eliminate the Label error.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 165 members 4,517 guests
Please welcome our newest community members: