# Visibility condition for calendar event based on user

**URL:** <https://community.glideapps.com/t/visibility-condition-for-calendar-event-based-on-user/56061>\
**Category:** Ask for Help\
**Created:** [December 26, 2022, 5:44pm UTC](https://community.glideapps.com/t/visibility-condition-for-calendar-event-based-on-user/56061 "2022-12-26T17:44:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devick](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@devick](https://community.glideapps.com/u/devick)\
**Post date:** [December 26, 2022, 5:44pm UTC](https://community.glideapps.com/t/visibility-condition-for-calendar-event-based-on-user/56061/1 "2022-12-26T17:44:25Z")

</div>

Hi, I’d like to allow users to see events in calendar view only if they are assigned to this event. How to do that ?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [December 26, 2022, 5:45pm UTC](https://community.glideapps.com/t/visibility-condition-for-calendar-event-based-on-user/56061/2 "2022-12-26T17:45:58Z")

</div>

Depends how you’re verifying that they’re assigned to the event. Ultimately, you’ll want to record or relate an event to the current user’s email or userID. Then, filter the list of events where the email is signed in user or userID is user\> rowID

---

<div class="post-metadata">

**Author:** ![devick](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@devick](https://community.glideapps.com/u/devick)\
**Post date:** [December 27, 2022, 12:29pm UTC](https://community.glideapps.com/t/visibility-condition-for-calendar-event-based-on-user/56061/3 "2022-12-27T12:29:17Z")

</div>

Re : My problem (re-explained) was :

- Allow a user to see an event in calendar view **only if** they are assigned to the event **or** if they are an admin (who must see all events).

To achieve this I did this :

1- I Created a new boolean column in _ **user table** _ called “Is admin ? (1)”  
2- I Check the box for all admins  
3- In the event form, I added the component “Is admin ? (1)” from “Values from user profil” that fills the coresponding newly created boolean column in _ **Event table** _ (“Is admin ? (2)”)  
4- To assign a user to the event you just have to create a list of “assignable users”, then allow one to add them in the event form  
5- Finally, in the calendar view I added the **filter data option** :  
“Is admin ? (2)” is “User profile \> Is admin ? (1)”  
**or**  
“Assigned user” includes “User profile \> Name”

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [December 28, 2022, 12:29pm UTC](https://community.glideapps.com/t/visibility-condition-for-calendar-event-based-on-user/56061/4 "2022-12-28T12:29:26Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
