Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JoseCVM
Employee
Employee

Limit selected items in nested navigation table

Hello,

 

As the title says, I'm having trouble figuring out how do I limit the number of selected items in a nested navigation table. I need to enforce a global maximum of 1 selected leaf item, independently of which subcategory its into. I'm basing my code around
https://github.com/microsoft/DataConnectors/blob/master/samples/NavigationTable/NavigationTable.pq
More specifically the NavigationTable.Nested one. Is it possible to disallow the selection of more than 1 leaf item across the whole table? How do I go about it? 

1 ACCEPTED SOLUTION

Here is an example of a function that only lets you choose one of three options:

 

= Value.ReplaceType((txt as text) => ..., (type function (txt as (type text meta [Documentation.AllowedValues={"a", "b","c"}])) as any))

 

View solution in original post

5 REPLIES 5
artemus
Employee
Employee

What you could do it make each subtree node a function which takes in a single value. You can then add metadata to that parameter with  a list of possible values based on the leaf nodes.

Here is an example of a function that only lets you choose one of three options:

 

= Value.ReplaceType((txt as text) => ..., (type function (txt as (type text meta [Documentation.AllowedValues={"a", "b","c"}])) as any))

 

I get the idea, but I'm not sure how to make this fit into my current navigation table. Still, thanks!

Jimmy801
Community Champion
Community Champion

Hello @JoseCVM@v-lid-msft 

 

thank you about involving me, but I have to admint that I'm not an expert on custom connectors. However I gave it a deep look and I unfortunatly didn't find and handling possibilities for this, because the only way to make this work is a option in the library itself. 

I don't have any testing environments, so can't really figure out by myself

- on the SQL data connector is available an option "select multiple elements". so it seems to me that there might be some possibilities to have an impact on this. 

- what if for every navigation table row the option for "isleaf" is set to false (and not launch a navigation table function but invoke the data connector)... how would this work out.

 

Hope that helps at least a little bit

 

Jimmy

v-lid-msft
Community Support
Community Support

Hi @JoseCVM ,

 

Sorry for that, we did not find any function can achieve this according this document. We are not very good at developing cutome connector, Maybe there are some solution we did not come up with.  Hi @Jimmy801 and @artemus , Could you please look into this  scenario and give some help, Thanks in advance.

 


Best regards,

 

 

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors