So I have been trying to get help from Knack Support to no success on this other than pointing me to the Action Link page in the Knowledgebase.
What I have is a table of attendees that is populated by them completing a Summit Registration Form. Once they are in the application via SSO, they can then go to the Sessions page and see all of the sessions. I wanted to via Action Link if possible allow them to click a button that adds their name as going to the session in which the Action Link is beside. Is this possible and if so how do I make this count in the Attendee listing for the session itself? I do not see anything under Actions that suggests that this is possible for the currently logged in user.
For reference:
- My “Sessions” table has a field called “Registered Attendees” which is connected to my Attendees table (This field can connect many sessions records with many attendee records).
Hi Michael,
My suggestion in this situation would be to structure the many-to-many connection as a one-to-many with a join table in between your existing tables. What that might look like is having a separate Session Registration or Session Attendance table that is connected to both the Sessions and to the Attendees.
Then you could use your same workflow with an action to Insert a Connected Record to that table when the user clicks to attend a session.
Otherwise, as-is, you are running into a limitation without custom code, unless someone else has another suggestion / workaround.
1 Like
Ok, I am trying to visualize this. So lets say I call the in-between table “Session Attendance.” Would the table only consist of the connection fields between the two tables its connected to?
Assuming the following, let me know if its correct:
- Each Session Attendance connects with one Attendee. Each Attendee connects with many Session Attendances. Correct?
- Each Session Attendance connects with one Session. Each Session connects with many Session Attendances. Correct?
What field would I need to create or change the default short text field to in this new table/connection called “Session Attendance?”
Seems like the Action isn’t correct even though I changed it to insert a new record to the newly created table “Session Attendance.”
When clicking the Action button “Register” when I go back and look at the table this is what it reflects.
Disclaimer, while I have mostly mastered the Knack builder and guide its these advanced things that evade me especially since there is no guide to point to. I am a novice when it comes to creating in Knack and the university doesn’t allow me to acquire a consultant or someone to just build these things.
Hi Michael,
That’s correct - I would maybe consider logging the Attendee with the logged-in user based on the setup you have, or you could instead insert a connected record to the Attendee and then set the Session field equal to the Session field in your Sessions table since that is the data source for the table where your action is going. For any other fields you want in Session Attendance, you can add them as you see fit and update them with the initial “Insert Connected Record” record rule.
You could then add some counts, sums, averages, etc. of Session Attendance from within your Sessions and Attendee tables.
re: your point regarding the Knack guide
I completely understand - I don’t work for Knack, but I do hear your point about some of the nuances of good database design not being evident in the guides. And I do think many people are in your situation, where they are turning to Knack without consultants / expertise. What I can say is to stick with it and try to unblock yourself because what Knack does do is abstract away an awful lot of technical concepts, so as you get more comfortable, you will be able to build faster and more effectively.
If you’re looking for more resources outside of what Knack provides, you can always brush up on relational databases. Something like PostgreSQL is open-source and therefore there are countless videos, articles, etc. online that you could peruse that will invariably have some crossover with how you’re structuring your tables in Knack.
Hope this helps, and don’t get too discouraged!
I think that is where I am getting stuck. I was trying to use the “Action” button but when looking under the action of Update Connected Record or even Insert New Record for the corresponding connections there is no “to logged in user.”
I wish I could get on the phone with Knack to talk it through as I am probably missing something simple that is just not making that an option even when going the form route versus just using the Action button. They do not make this possible even on my plan which is the Corporate plan.
I have come across a couple of things after back and forth emails that they admit are broken and had to refer to their engineers but have no ETA on a fix such as multiple rules triggering on fields in a form for the Show/Hide versus Hide/Show.
1 Like
You should be able to change that here, for example, provided that your page is login-protected.
Its not an option there. I have checked the connections.
Make sure your connection is to the Attendee user role, not the Attendee table in your database. Also make sure the page is nested beneath a login page (not publicly available).
I ended up renaming that top table to Summit Registrations so that I didnt confuse myself by having the User Role called Attendee and a table called Attendees. Also they are behind a login page that the Summit Attendee role is a part of.
This is probably something you or anyone else would take a look at and instantly know whats wrong. I have even leverage ChatGPT which seems to know more about Knack than I thought it would. I may have to scrap this part if I cannot figure it out by the deadline.
@MichaelWil71217 and I connected via message but update for anyone lurking and experiencing the same problems:
- The ability to set a value to the logged-in user depends on specific roles attached to your login settings i.e. in the screenshot below, the Permissions button was unchecked and therefore there were no role-specific permissions.
Otherwise you need to make use of the connection with the “Account” and it should allow you the option. You can read more about user roles and permissions here.
1 Like