Filtering Collection with Column Values

I’ve never been able to successfully use the filter data as it seems it should work. Wondering if I’m missing something obvious.

Here’s a perfect current example: I’m using a comments collection as a log for various events. In the data table for the comments log, I have a “Source ID” column that stores the Row ID of the associated screen. The intention is to use this Source ID to filter and only show the comments relevant to the item where the comment was left.

When I go Filter Data on the comments collection, I’m selecting to filter where “Source ID is Screen → Row ID”. (image below) This doesn’t work. It hides all comments - as shown in screenshot (there should be a test comment shown). This is the same issue I’ve experienced across multiple filters I’ve attempted.

I’ve verified that the Source ID and Screen Row ID are exact. To test this, I just added a temporary field above comments that shows the Screen Row ID (pictured).

However, if I change the filter from “Source ID is Screen → Row ID” (doesn’t work) to a static “Source ID is Qf2JOC-kSsqSMn-cH.wGRw” (where I’m just copy and pasting the Screen Row ID from the layout screen), this works as expected, and you can see the relevant test comment is properly shown, but all others are filtered out.

Can anyone weigh in on this? I’ve verified three different ways that the values are exactly the same. Custom works, values from columns aren’t working. Thanks!

Why are you showing the comments component inside what looks like a form? Shouldn’t it be on the details screen?

That’s a fair question! And yes, it’s the “Show Edit Screen” as opposed to the “Show Detail Screen” on item click.

I’m using the built in comment component as a “log” so that the user can leave specific feedback remarks that are relevant to the actual form edits they’re submitting. Here’s the exact use case:

We have a Purchase Order made up of many Line Items. When clicking into the Line Item, certain tasks will be completed that require the logging of the number of sheets printed, and how many of those sheets are lost/rejected. The original thinking was that the log of comments is most highly relevant to the user at the moment they’re entering in the updates to the task numbers. So I put it directly into the form areas in the edit screen.

I’m fairly certain i’ve experienced the same filtering issue regardless if I’m inside a details screen or an edit/form screen. Are you thinking that might be causing the issue? If so, I can rebuild same view in the details screen instead.

Rebuilding the same functionality described above but doing it on the Detail Screen immediately fixed the filtering issue. Thanks for that push.

I’ll admit, I don’t understand why the filtering logic would be different for why this works on Details Screen and not on Edit/Form Screen, but it worked.

1 Like

I’m not sure as well, but I haven’t had any issues doing the same thing with details screen, I guess I haven’t had use cases where I have to put a collection in an edit form.

Have you tried using a relation to power your collection? I think that may work better than pointing to the whole table and then filtering.

I’ve used relation on the collection level in other cases yea. I filtered here only because the entire comment log is rather small at the moment. But you’re right - as it grows, it will almost certainly be better to reference the relation as opposed to pointing to an increasingly large table and filtering down. Thanks again.

1 Like

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