# Flowfunc:Dynamic Input Ports

**URL:** <https://community.plotly.com/t/flowfunc-dynamic-input-ports/76469>\
**Category:** Dash Python\
**Tags:** community-components\
**Created:** [June 27, 2023, 10:43pm UTC](https://community.plotly.com/t/flowfunc-dynamic-input-ports/76469 "2023-06-27T22:43:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![popo](https://avatars.discourse-cdn.com/v4/letter/p/5f9b8f/32.png) [@popo](https://community.plotly.com/u/popo)\
**Post date:** [June 27, 2023, 10:43pm UTC](https://community.plotly.com/t/flowfunc-dynamic-input-ports/76469/1 "2023-06-27T22:43:33Z")

</div>

[FlowFunc](https://github.com/idling-mind/flowfunc) is a brilliant component from @idling-mind based on [Flume](https://flume.dev/)  
One of the very few components introducing Visual Programming with Dash.

I greatly recommend anyone to check out the [demo](https://najeem.pythonanywhere.com/).

Is it possible to create ports on the fly?

A simple, fictive example could be to create a ‘concat string’ node.

It takes an undefined amount of strings as Inputs and concatenates them.

- When created, the node starts off with 1 str input
- Each time a str is entered (through connection or input port), a new input Port gets created on the fly.
- a Port is removed, when clicking a cross or trash icon
- allowing us to enter a 2nd str, and a 3rd,
- …
- a Port is removed, when clicking a cross or trash icon

A bit like the MultipleSelect Control but each item gets its dedicated Port and Control  
([check color Port example](https://flume.dev/docs/controls#defaultvalue--array))

Is this somehow possible with flowfunc?  
If so, would we need dash callbacks or is this built into flowfunc?

This would greatly enhance potential usecases for flowfunc !

---

<div class="post-metadata">

**Author:** ![idling-mind](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/idling-mind/32/33248_2.png) [@idling-mind](https://community.plotly.com/u/idling-mind)\
**Post date:** [July 27, 2023, 10:38am UTC](https://community.plotly.com/t/flowfunc-dynamic-input-ports/76469/2 "2023-07-27T10:38:55Z")

</div>

I have added a feature where you can define `Node.inputs` as a javascript function defined in `assets/*.js`. Take a look at the solution for your problem here. [Dynamic Input Ports · idling-mind/flowfunc · Discussion #14 · GitHub](https://github.com/idling-mind/flowfunc/discussions/14#discussioncomment-6554333)
