Read parameters in description: INodeTypeDescription

{
	displayName: 'Endpoint',
	name: 'endpoint',
	type: 'options',
	options: getEndpointOptions('{{ $parameter["endpointCollection"] }}'),
	default: '',
	displayOptions: {
		show: {
			operation: ['employee'],
		},
	},
	description: 'Endpoints related to operation',
}

I have this property that im trying to pass in a function that returns options of the selected endpointCollection
However i dont know if there is a better way of reading the parameters in the properties array
or if there is a better way of loading option. The option cant use the displayOptions because they are a lot and it reached limit If there is away please help

n8n version: latest
Database (default: SQLite):
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via npm:
Operating system: win 11

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Onlypfachi

Check out the loadOptionsMethod and loadOptionsDependsOn properties to dynamically load options based on the value of another property.

Here’s our documentation on this: Base files | n8n Docs

And here’s an example from the community: (Integration) Refresh attributes list automatically

{
	displayName: 'City',
	typeOptions: {
		loadOptionsDependsOn: ['country'],
	},
}

You could try to limit the number of options that need to be loaded at once by adding more dependencies or filters, or by limiting the number of options returned by your getEndpointOptions function.

Let us know how you get on! :slight_smile:

1 Like

thank you @ria this fixed my issue

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.