Replies: 2 comments 4 replies
-
Hey @conorw Is the concern of returning all of the relational row ids a performance concern? If you're finding the app is running a bit sluggish, then you could try creating and using an intermediary table.
Therefore when you return services, you would only have a single row link, rather than thousands. The compromise may be a potential redesign of your screens to handle the new relationships. |
Beta Was this translation helpful? Give feedback.
-
@conorw I had a go at implementing a linking table. STEP 1 - DATASetup four tables with the following relations:
STEP 2 - SERVICES SCREENHave a services screen, that has a link for each service to view those in attendance: For the URL, we want to pass the AttendanceGroup id and the name of the service: In the STEP 3 - ATTENDEES SCREENThe attendance screen will show the list of attendees for the chosen service. Set the route to match the parameters passed from the services screen: The top-level of the tree will have a AttendanceGroup data provider filtered on the group id from the URL: The text for the service headline can be pulled from the URL: Next add a repeater Attendance Group and underneath another data provider for the attendees. This Attendees Data Provider can then be used as a source for the list of attendees table. The design may look a little strange with multiple tables, but when running, the groupid from the URL will filter that down to the single list of attendees for that particular group / service. Finally define an action for the 'Add Attendee' button. STEP 4 - ADD NEW ATTENDEE SCREENSet the screen route to include the groupid as follows: Now add a form with an options picker for selecting the attending Person, as well as a date picker for the date. Additionally, add a data provider for the AttendanceGroup (once again filtered on the URL groupid). Finally, 'Define actions' for the Save button. This will have two save row actions. The second we want to update the AttendanceGroup (via groupid passed in the URL) and update the attendees: And the JavaScript:
This may not be the exact use case you're going for, but hopefully it gives you some ideas for how you can improve the performance of your app! App Export: |
Beta Was this translation helpful? Give feedback.
-
I have a lookup table defined as an internal BB table:
"Service": lists all possible services, used for dropdown selection on some screens (see image below).
When the service is selected in the drop down it is added to the parent record when the parent record is saved.
However, when retrieving the list of services to populate a dataprovider (and combo box), the query returns the list of services AND all the relational data for each service (in my case this amounts to ~1000 rows)
Is it possible to only return the simple list (without relational data) or am I misusing relations completely?
Beta Was this translation helpful? Give feedback.
All reactions