cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to sort widgets in a specific order?

laus
New Contributor III

I'd like to have a couple of widgets, one for the start and another for end date. I want them to appear in that order but when I run the code below, end date shows up before the start date. How can order in the way I I desired?

dbutils.widgets.text("start_date", "yyyy-mm-dd", "start_date")

dbutils.widgets.text("end_date", "yyyy-mm-dd", "end_date")

1 ACCEPTED SOLUTION

Accepted Solutions

Ravi
Valued Contributor
Valued Contributor

@Laura Blancarte​ @Werner Stinckens​ You can change the order of widgets displayed in the notebook by going into widget edit mode and dragging the widget to the expected order.

image.pngimage

View solution in original post

5 REPLIES 5

-werners-
Esteemed Contributor III

I think widgets are ordered by their label.

So if you would change your label of end_date to zend_date it would appear last.

But that is not very interesting ofc.

I tried if this works with the widget name but that does not do anything.

Ravi
Valued Contributor
Valued Contributor

@Laura Blancarte​ @Werner Stinckens​ You can change the order of widgets displayed in the notebook by going into widget edit mode and dragging the widget to the expected order.

image.pngimage

laus
New Contributor III

@Ravirahul Padmanabhan​  and @Werner Stinckens​ , for me going into edit mode as suggested by Ravi worked like a charm! Thank you both!

Hubert-Dudek
Esteemed Contributor III

Hi @Laura Blancarte​ , That's awesome. Would you like to mark @Ravirahul Padmanabhan​ post as the best answer?

laus
New Contributor III

Done 🙂

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.