Add a list into Dropdown component from script

How can I add a list into Dropdown component from script?

The list for a dropdown is a dataset like any other. Use system.dataset.toDataSet() to create one from scratch.

Depending on the layout of your dataset (number of columns and datatype of the columns), the behaviour of the “selectedValue”, “selectedStringValue” and “selectedLabel” can differ though.

See the docs: https://support.inductiveautomation.com/usermanuals/ignition/index.html?input_pmicombobox.htm