Replies: 2 comments 2 replies
-
You can reference the device variable via 'device_id' in your query_params of the Interface model to accomplish this. After selecting a device (or multiple), the Interface dropdown would then populate with only related interfaces. |
Beta Was this translation helpful? Give feedback.
-
Hi @zmaster7, Thank you for your input! The following lines return an error! ObjectVar object has no id. class TestSCRIPT(Script):
I guess this dynamic approach to use the device input for filtering the options of the next objectvar (interface) is not possible or? Thank you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Community,
Is it possible in a netbox script to get a device input from the user and list all interfaces of the device in a drop down menu so that the user chooses an interface before the def run is executed?
This way, we could dynamically use the user input to collect another input related to the first one before execution.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions