adding attendees with virtual column - duplicate error

Dear All,

I created an app which has "Members" and "Sessions" tabs. The goal is to be able to register multiple members (as attendees) on the sessions. For that I created a virtual column on the Sessions tab, and I am able to add a Member from a dropdown list, but only 1, because if there is 1 member on a session already, and I try to add another, it gives an error message that says "There is already a row with key xyz". The key is the session's ID, so it seems like it doesn't allow 1 ID to be registered twice.

Example:
I was able to add 1 member as attendee

jokaa_0-1692194596917.png

but once I try to add another, I have this error message:

jokaa_1-1692194680726.png

Can someone please help me with this? 
Thank you in advance!

 

Solved Solved
0 9 194
1 ACCEPTED SOLUTION

Create a third table called "Members_Session_Assignment" with at least 3 columns:

AssignmentID | type "text" | Initial value "UNIQUEID()"

Members_Link | type "ref" | Source table "Members"

Session_link | type "ref" | Sessions source table

Make sure the correct labels (not IDs) are selected in the Members and Session tables.

Now create a form view for table "Members_Session_Assignment" and you can select a member individually for each session.

A solution to select all participants for a session at once can also be presented if required.

View solution in original post

9 REPLIES 9

The child table needs to have its own key value, not share the session's key value.

Thank you so much for the response!

This is how the 2 tables look like which leads to the scenario described above:

jokaa_1-1692207720525.png

It gives me a dropdown list with all the members' names and pulls the session's ID automatically:

jokaa_2-1692207815056.png

If I add the child table another key (the name of the member) then I do not have the dropdown list and it pulls the session's ID into the name field:

jokaa_3-1692207943647.png

And with this setup the same thing happens, I add a test line to the attendees and if I try to add another, it gives me the same error message:

jokaa_4-1692208270037.pngjokaa_5-1692208310245.png

The desired goal would be to keep the dropdown list with the names and to be able to register multiple attendees to 1 session.  My apologies for the multiple posts but could you please help me with how that could be done?

Thank you for your help again!

Oh I see now, you manually created the REF_ROWS 'related...' VC. Don't do that. Delete that VC. You need to set up a Ref column in the child table that points to the parent.

https://help.appsheet.com/en/articles/961426-references-between-tables

Thank you! I created a ref column in the child table and it helped indeed, now I can save multiple members, however, now it saves the members for each and every session, not just for the one I registered them:

jokaa_0-1692212993296.pngjokaa_1-1692213037793.png

I'm really sorry for the multiple questions, I'm not sure what I'm doing wrong. Do you have any ideas how this could be fixed so that it registers the attendees only for the session I actually register them and not for all the sessions?

Thank you!

Your new VC is pulling the entire table for every record, that's all. You don't need to manually create a VC on the parent table. Do this to make sure the situation is "reset" and re-built:

  1. Delete that new VC
  2. Set [Topic] column in child table to Text.
  3. Save the editor.
  4. Set [Topic] back to Ref.
  5. Save again.
  6. Notice how the "related.." REF_ROWS VC in auto-generated.

Additional note, why is [Name] a Ref too? That's most likely not appropriate.

Hi, I followed steps 1-6, indeed the REF_ROWS was autogenerated, however, now it's back to square one (only now from the member's perspective so now it allows multiple members on 1 session, but only I can register 1 member to 1 session only), if I add a member to a session and try to add the same member to another session, it gives me the same error message "There is already a row with the key xyz"

 

jokaa_1-1692217042118.pngjokaa_2-1692217097696.png

Maybe I didn't describe well what I would like to achieve, my apologies, so I would like to be able to add many members to 1 session but at the same time add a member to several sessions (like there is a team and each team member can apply to whichever sessions they would like to). How could this be achieved? Thank you so much for your help and patience!

<p>answer:  You must use a third table where the relationship between the two previous tables is and you can have many-to-many records.</p>
<p>you can call it member_sessions,</p>
<p>where several records appear as many sessions you have of each member</p>
<p>if you want I can help you with that</p>

 

Create a third table called "Members_Session_Assignment" with at least 3 columns:

AssignmentID | type "text" | Initial value "UNIQUEID()"

Members_Link | type "ref" | Source table "Members"

Session_link | type "ref" | Sessions source table

Make sure the correct labels (not IDs) are selected in the Members and Session tables.

Now create a form view for table "Members_Session_Assignment" and you can select a member individually for each session.

A solution to select all participants for a session at once can also be presented if required.

Dear All, 
Thank you so much for your help, it worked with Tommy62's solution!
Highly appreciated ๐Ÿ™‚

Top Labels in this Space