To dynamically hide a field in this example, the macro sc\_field\_display is used, which is responsible for hiding or dynamically displaying a field or several.  
  
This macro has scope in the following events:

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=2qey7722771250a9d46a8a379dd4467f8f24d)

In this example, it will be used within an AJAX event of type onChange:

1. The onChange type event is created:

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=2qey798f13d481243492ca8d537d69729c0f3)

2. Now the macro sc\_field\_display will be used by means of a condition that is going to hide or show a field dynamically:

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=2qey7781e39887dfb47e28c4f44a47d65ccc8)

3. We save the changes and execute the application

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=2qey72b33d237f9f948388c144423aff6604d)

4. When executing all the fields are shown, and also the field "state" which must be hidden by means of the change that is applied to the field "familia\_id"

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=2qey7b9a631b11aa84804915aefceaf509c58)

5. Then changing the field "email" and the "customersid" is even, it hides the field "status"

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=2qey7109ac7f8815e44668f780ced61668f23)