- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2021 10:20 PM
The widget is not shown when I use dbutils while it works perfect with sql.
For example,
%sql
CREATE WIDGET TEXT state DEFAULT "CA"
This one shows me widget.
dbutils.widgets.text("name", "Brickster", "Name")
dbutils.widgets.multiselect("colors", "orange", ["red", "orange", "black", "blue"], "Traffic Sources")
This one shows nothing even though I can see `Command took 0.03 seconds` message.
Also, I can get results from widget even though I cannot see it when I use codes below.
name = dbutils.widgets.get("name")
colors = dbutils.widgets.get("colors").split(",")
html = "<div>Hi {}! Select your color preference.</div>".format(name)
for c in colors:
html += """<label for="{}" style="color:{}"><input type="radio"> {}</label><br>""".format(c, c, c)
displayHTML(html)
I attached images.
- Labels:
-
Notebook
-
Notebook Display Widgets
-
Widget
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021 04:45 PM
Hello, Ryan! For some reason, this problem is solved, and now it is working perfectly! I did nothing new, but it is just working now.
Thank you!:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021 01:30 PM
Hi @DAIN KIM , I tried to reproduce your issue but was unable to. Which language of notebook are you using (python,sql)?
And just to be clear, the python dbutils.widget.text does not show up at the top of the notebook?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021 04:45 PM
Hello, Ryan! For some reason, this problem is solved, and now it is working perfectly! I did nothing new, but it is just working now.
Thank you!:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 09:25 AM
That is great to hear! It seemed like an odd issue but glad it all worked out.

