Skip to content

Examples Of Functions in Navigation Tables #348

@OptrixAU

Description

@OptrixAU

Preflight Checklist

Problem

I'm struggling to write a function in a Custom Connector that is available via Navigation Tables that allows parameters to be sent but also uses information from the navigation table itself (ie. the URL).

For example, let's say I've got the following Navigation Table hierarchy....

Server 1

APIs

Alpha
Beta

Server 2

APIs

Alpha
Beta

These are dynamically created, so internally they call call the same M function (ie. MyConnector.CallAPI). I need to be able to tell the difference between the 'Beta' function on Server 1 vs the 'Beta' function on Server 2, while still allowing parameters to be set by the end-user.

When using Table.ToNavigationTable, I know I can set 'data' to...

function_name(url) to specifically call the function with a given url, or
function_name to allow the system to read parameter metadata so it can provide a UI.

Is there a mechanism available to do both - have a single parameter passed from navigation, and the rest of the parameters supplied by the user.

Desired Solution

I'd like to be able to have a Custom Connector function work with both navigation-supplied and user-supplied parameters.

For example, a named property in the called function that always contains the full navigation URL. So if I had the following...

MyConnector.APIFunction = (userparam as text, navigationurl as text)...

userparam would be a parameter set in the UI, while
navigationurl would be the endpoint URL chosen from the navigation.

Alternatives and Workarounds

I've tried some techniques (various ways of passing the function in Table.ToNavigationTable), but I'm not familiar enough with M and its quirks to figure it out.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions