# Announcement Banner

**URL:** <https://community.glideapps.com/t/announcement-banner/57554>\
**Category:** Ask for Help\
**Created:** [February 6, 2023, 7:15am UTC](https://community.glideapps.com/t/announcement-banner/57554 "2023-02-06T07:15:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@madhu](https://community.glideapps.com/u/madhu)\
**Post date:** [February 6, 2023, 7:15am UTC](https://community.glideapps.com/t/announcement-banner/57554/1 "2023-02-06T07:15:36Z")

</div>

Hello Everyone,  
I want to create a announcement banner, on home page, which will be visible only between it’s start date and end date,  
for that I have created a announcement tab for Admin, where admin can click on button “make Announcement” and types the announcement and it’s start date and end date, these data will be stored in the announcement table,  
Now i want to fetch it into the Accounts table to display that Announcement in the home page for all the users, only during the particular duration.  
but when I lookup the start date and end date from announcement date is getting con=verted as text so i am not able to set the visibility condition for the announcemnet\<

Could anyone tell me the better way to do this Announcement banner

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2023, 7:20am UTC](https://community.glideapps.com/t/announcement-banner/57554/3 "2023-02-06T07:20:14Z")

</div>

> [@madhu](#):
>
> but when I lookup the start date and end date from announcement date is getting con=verted as text so i am not able to set the visibility condition for the announcemnet\<

Are you sure the source columns are configured as date/time types?  
Can you show a screen shot of the source columns?

---

<div class="post-metadata">

**Author:** ![madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@madhu](https://community.glideapps.com/u/madhu)\
**Post date:** [February 6, 2023, 7:28am UTC](https://community.glideapps.com/t/announcement-banner/57554/4 "2023-02-06T07:28:03Z")

</div>

![announcement](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/4/b440299598d24d2655e276a077e67a7974465f03.png)  
 ![Account Announcement](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b65a559938385e10af12ed083edf02ac3faf324d.png)  
 ![End date](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/6/4669f0535dec24edf5d353064ae363844e971dee.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2023, 7:33am UTC](https://community.glideapps.com/t/announcement-banner/57554/5 "2023-02-06T07:33:12Z")

</div>

Looks like your relation is a multiple relation, and so your lookup is returning an array.  
Change it to a single relation and it should work.

---

<div class="post-metadata">

**Author:** ![madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@madhu](https://community.glideapps.com/u/madhu)\
**Post date:** [February 6, 2023, 7:37am UTC](https://community.glideapps.com/t/announcement-banner/57554/6 "2023-02-06T07:37:16Z")

</div>

I am not getting, between which columns I should create relation because Admin is the one who makes the announcement and in accounts table there many users along with 2 admins

---

<div class="post-metadata">

**Author:** ![madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@madhu](https://community.glideapps.com/u/madhu)\
**Post date:** [February 6, 2023, 7:46am UTC](https://community.glideapps.com/t/announcement-banner/57554/7 "2023-02-06T07:46:34Z")

</div>

It’s okay if you suggest whole new method to implement the Announcement banner

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2023, 7:47am UTC](https://community.glideapps.com/t/announcement-banner/57554/8 "2023-02-06T07:47:37Z")

</div>

I think I would take a different approach.  
If I look at your first screen shot, I see two announcements with a start date of Feb 2nd.  
So this means you can have more than one announcement that is current at any given time.  
With that in mind, here is what I would suggest:

- In your Announcements table, create an if-then-else column as follows:  
– If Start Date is after Now, then null (leave empty)  
– If End Date is before Now, then null  
– Else true
- The if-then-else column should return true for any current announcement.
- So you can add a collection of Announcements to your screen, and use the if-then-else column as a filter (only show Announcements where that column is checked).

---

<div class="post-metadata">

**Author:** ![madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@madhu](https://community.glideapps.com/u/madhu)\
**Post date:** [February 6, 2023, 8:23am UTC](https://community.glideapps.com/t/announcement-banner/57554/9 "2023-02-06T08:23:30Z")

</div>

Thank you for the solution, I did the same in Announcement table but how do I fetch the announcement which is true to the accounts table

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2023, 8:30am UTC](https://community.glideapps.com/t/announcement-banner/57554/10 "2023-02-06T08:30:14Z")

</div>

Use a Collection with your Announcements table as the source, and use the if-then-else column to filter it.

---

<div class="post-metadata">

**Author:** ![madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@madhu](https://community.glideapps.com/u/madhu)\
**Post date:** [February 6, 2023, 9:25am UTC](https://community.glideapps.com/t/announcement-banner/57554/11 "2023-02-06T09:25:43Z")

</div>

Ok, Thank You

---

<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:** [February 7, 2023, 9:25am UTC](https://community.glideapps.com/t/announcement-banner/57554/12 "2023-02-07T09:25:57Z")

</div>

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