# Create new visibility rule

<!-- -->

1. Imagine workspace manager wants to see the form with information about when timelog was created.
2. For this - let's add creation-date field to the layout, edit **views/layouts/dashboard.tsx** .

views/layouts/dashboard.tsx

```
<field name="creation_date" />
```

3. Publish the app and see this info shows in the form now:

\[image: Timelog form with the creation date field visible below other fields]

4. This field is now visible for everyone, but let's show it only for workspace admin, who really wanted this
5. In VS Code - let's edit **views/logic/index.ts** file - add the `getInvisibleFields` function:

views/logic/index.ts

```
import { entity } from '#typings';
import type { ViewLogic } from '@comind/api';

export default {
	getInvisibleFields,
} satisfies ViewLogic<typeof entity>;

function getInvisibleFields() {
	const invisibleFields: string[] = [];
	if (entity.state !== 'rejected') invisibleFields.push('state');
	if (!entity.c_cost) invisibleFields.push('creation_date');
	return invisibleFields;
}
```

6. When you publish the app - this field will be visible in the form only for the workspace admins

For a full reference on `getInvisibleFields`, `getReadonlyFields`, `getRequiredFields`, and other dynamic field control methods, see [View logic](/developer-guide/building-blocks/view-logic.md).
