Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
In order to edit a project variable in a visual application, I want to create a search box with auto suggestions. I managed to create Select boxes for variables with this Python Code:
import dataiku
def do(payload, config, plugin_config, inputs):
countries = dataiku.Dataset("Countries").get_dataframe()
choices = []
for val in countries['Land'].unique():
choices.append({"value": val, "label": val})
return {"choices": choices}
I can also create a search box with suggestions in JavaScript where the possible choices are hardcoded. I struggle however to populate the choices for the suggestions from a dataset, similar to the above Python code. I studied the example here but it doesn't become quite clear to me how to integrate callPythonDo() into the JavaScript code.
Thanks for any help.
Operating system used: MacOS Monterey 12.1