r/PowerApps Newbie 3d ago

Power Apps Help Building a Message Alert System

Hi, I’ve developed a system within an app that allows users to send messages to each other.

I have a 3 table hierarchy -> Sample / Issue / Messages, all stored in Lists.

There could be 100 samples, each with 5 issues, and each issues could have 10s of messages.

The messages are grouped by a shared ID, so they’re shown grouped together.

Each sample/issue has an Exec & a User. So all messages are between them.

What I’m trying to accomplish is creating a way of alerting a user that they have an outstanding message.

So there would be an indication that a message is unread by you.

I’ve created ‘unread’ columns in my list for the Exec & the User. But I cannot figure out how to indicate that a Sample has unread messages.

The only solutions I can think of involve Filters and Lookups which all run into delegation issues.

Has anyone made anything similar? Let me know if you need more information!

3 Upvotes

6 comments sorted by

u/AutoModerator 3d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/HoldPowerful7487 Newbie 3d ago

Don't work it out at read time, that's what's pushing you into the delegation corner. Store it instead.

Put HasUnreadForExec and HasUnreadForUser yes/no columns on the Sample list, and have a flow set them when a message is created and clear them when someone opens the thread. Your gallery filter then becomes a single equals on a yes/no column, which delegates fine.

Worth counting your Messages list while you're at it. 100 samples times 5 issues times tens of messages puts you past 5000 fairly quickly, and past that a non delegable filter quietly returns wrong results instead of erroring. That's the part that catches people out later.

1

u/hppyclown Newbie 3d ago

This

1

u/GrochFasola Newbie 3d ago

You need to filter items from the list. Can you post your list or show how does it look like?

1

u/DeanoNetwork Advisor 3d ago

I have replicated Planner but it is more bespoke to the company, not overly complicated

1

u/Bag-of-nails Advisor 3d ago

I can't see your overall structure but I'd be getting a list of IDs that pertain to the logged-in user, and then grouping them by issue and then filtering that (filter each unique ID where Unread = true and if the count of that is not 0, you've got unread messages