# DASH - Calling a python function using a form button

**URL:** <https://community.plotly.com/t/dash-calling-a-python-function-using-a-form-button/14046>\
**Category:** Dash Python\
**Created:** [September 28, 2018, 1:51pm UTC](https://community.plotly.com/t/dash-calling-a-python-function-using-a-form-button/14046 "2018-09-28T13:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joaopaulo.bsilva](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/joaopaulo.bsilva/32/4293_2.png) [@Joaopaulo.bsilva](https://community.plotly.com/u/Joaopaulo.bsilva)\
**Post date:** [September 28, 2018, 1:51pm UTC](https://community.plotly.com/t/dash-calling-a-python-function-using-a-form-button/14046/1 "2018-09-28T13:51:09Z")

</div>

Hy, guys !

I have a python function that returns one random row from a dataframe. How do a call that function using a button created by app.dash and save the return from the function in another variable ?
