Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Issue Filtering View with Related Tables and URL Parameters in AppSheet

Dear AppSheet Community,

I am experiencing a frustrating issue while attempting to filter a View in my AppSheet application, and I'm hoping someone can provide some guidance.

Here's a breakdown of my setup and the problem I'm facing:

I have three tables: "Events", "Participants", and "Attendance".
The "Attendance" table has a relation to the "Events" table through the "EventID" column.
In my "Events Detail" View, I've added an action button that should display a list of attendees for the specific event being viewed.
This button is supposed to link to an "Attendees List" View, which is based on the "Attendance" table.
My goal is to filter the "Attendees List" View to show only the attendance records that match the "EventID" of the event displayed in the "Events Detail" View.
I have tried using the following row filter condition in the "Attendees List" View: [EventID] = CONTEXT("EventID")
However, the "Attendees List" View is displaying all attendance records, regardless of the selected event.
When I click the action button, the URL that is generated is "//www.appsheet.com/manage/JavaScriptError". Therefore I cannot check the URL parameter.
Here are some additional details:

The "Attendance" table is related to the "Events" table through the "EventID" column.
I have confirmed that the data types for the "EventID" column are consistent across both tables.
AppSheet reports that the functions '_GET' and 'RELATED' are not found.
I have used the test function in the AppSheet editor to confirm that the “CONTEXT(“EventID”)” expression returns correct values.
I suspect there is a problem with the URL parameter being passed, or with how I am filtering the “Attendees View”.

Has anyone encountered a similar issue or have suggestions on how to properly filter this View? Any help would be greatly appreciated.

Thank you.

Solved Solved
0 2 122
1 ACCEPTED SOLUTION

If you have created the proper Ref column in the Attendance table for the Event, then you should automatically have a [Related Attendees] column showing in the Events table.  You COULD simply add this column to the Events Detail view and show an inline table of the Attendees.

If your preference is to navigate to the Attendees view with a button, as you have explained,  then you want to make sure you are using the "go to another view in this app" type action and implement in the Target View the expression something similar to this:

LINKTOFILTEREDVIEW("Attendees View",  [Event ID] = [_THISROW].[Event ID])

 This assumes that the [Event ID] column in the Events table and the Ref column in the Attendees table are indeed of the same name.  The CONTEXT() function doesn't make sense for this use case.

I hope this helps!!

View solution in original post

2 REPLIES 2

If you have created the proper Ref column in the Attendance table for the Event, then you should automatically have a [Related Attendees] column showing in the Events table.  You COULD simply add this column to the Events Detail view and show an inline table of the Attendees.

If your preference is to navigate to the Attendees view with a button, as you have explained,  then you want to make sure you are using the "go to another view in this app" type action and implement in the Target View the expression something similar to this:

LINKTOFILTEREDVIEW("Attendees View",  [Event ID] = [_THISROW].[Event ID])

 This assumes that the [Event ID] column in the Events table and the Ref column in the Attendees table are indeed of the same name.  The CONTEXT() function doesn't make sense for this use case.

I hope this helps!!

Dear WillowMobileSys,

Thank you very much for your kind advice. After trying the LINKTOFILTEREDVIEW() function, the issue was resolved.

Since I am translating from Japanese, I am not sure what the best expression of gratitude would be, but I offer you my utmost appreciation.

ARIGATOU-GOZAIMASU!!

Top Labels in this Space