Database Issue With Messaging


My users come to my web app and create pages for their business. On the business page, I want users to be able to display announcements.

How should I add this New Thing [Announcments] to the database?

On the page I want to display the 2 most recent announcements and have a view more CTA to view them all.

Any ideas?

Hi @samhouston1107 - here’s something quick that may work for you. You could have a button and multiline input (on the user’s business page or their admin page?) so the user could create new “Announcements”. Then on the user’s business page, you could have either a text field showing the two latest Announcements or alternatively a repeating group (do a Search for Announcements with Current User being the Creator). Hope that makes sense and helps you out.

I’ve created that part.

I trying to figure out how to setup the database.

You’d have a Type called “Announcements” with a Field also called “Announcement” (as Data type of Text). You could add another Field called “Business” of Type User if you wanted to track who’s creating the Announcement (though that data is automatically created with Created By info).

1 Like

Should I add a field called [ Announcements ] inside of type [Business Page] ?

Or just leave Type [ Announcements ] by it’s self, and like you said attach it back to the business page?

Either way you’ll need to create a new Type called “Announcements”. In one implementation you’d have a list of Announcements within “Business Page” and in second implementation you’d have “Announcements” with a data field called “Business” of data type “Business page” (so you can “tie” Announcements to a Business Page)

I’d implement a list of Announcements under Business Page as it’ll save you from doing searches (a performance hit) when showing Announcements for a Business Page.

1 Like

I got it working.

Thanks so much.

1 Like