# Component Actions

Component actions allow you to **push static or dynamic values into UI components**. You can also use formulas or JavaScript to set the value.

To use this action type, choose the "Run component action" from the action type drop-down:

<figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2F7KUKS3EHQ9zxxWn5pKC2%2Fimage.png?alt=media&#x26;token=e44bd068-b890-4c44-be08-ec4de2dd8d10" alt=""><figcaption></figcaption></figure>

Then choose the UI component you want to run the component action for:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FCFta8CbYUUveW3JQsopS%2Fxdtjcygv.JPG?alt=media\&token=27a43b41-f52c-4601-9873-0ef93c14095d)

From there, you have two options: **Clear value** or **Set value**:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FYovjjbUJnvtUO1dfdy70%2Fdjxctft.JPG?alt=media\&token=54d12c89-2729-4363-a99d-21d3a6b19dc6)

**Clear Value** will simply clear the value of the UI component after the action is successfully executed

**Set Value** allows you to put any value into the UI component after the action is executed.

**As an example**, let's assume we want to create a button that sets the date and time in the Date input field to the current date and time. For this, we'll need to reference the `Date` field in the "Run component action" **(1)** and specify what value we want to put into our `Date` field upon the button click **(2)**.

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FxuRdCIcXLncNb9hUXKp9%2Fntdxbrd.png?alt=media\&token=91aa3b14-88a1-42b3-aa75-fa22fae63125)

In our example, we want the date to be set to "Today", so we'll use the `NOW()` formula for that

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FBrNuL3CpwWBl5RuZwVkP%2Ftrnb66.png?alt=media\&token=7e2e0732-bf13-44b4-bdde-1dc7bb366831)

As a result, we get to set the date to "Today" whenever we click a button:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FD62iTcbTvvpcSgSZ36z1%2Fthdfvt.gif?alt=media\&token=76b0fcca-71a6-4323-83c8-d280b11473c3)
