Update data in 2 records at once

I have an app developed for my wife’s women’s group at my church. The app is to help organize the data and assignments for her women’s retreat. I have all things working but when I come to the idea of assigning “roommates” and wanting to select one person and then through a choice component with the list of names, allow her to select another person to be the roommate I am stumped. I can assign that name to the “roommate” field for the first record but wanted to also assign the person she selected first to the “roommate” field of the person selected in the Choice component. Perhaps it can’t be done or I am simply over complicating things. As always, i thank you all in advance for any advice, direction or correction :wink:
Jerry

If you set the Choice component up so that it writes to the User Profile row, you can use the selected value to establish a single relation to the selected user. And then use a Set Column values action through that relation to write the name of the Signed In user into the Room mate column.

The app is only used by my wife so it is not a User Profile row…just a row in a Members table.

ah, I see.

It’s still possible, however. Can you describe how she currently does it?
For example - when she selects the first person, is that a selection made from a collection that takes her to a details screen where the choice is made? Or is there an edit form involved?

Understanding the current flow will help me suggest the best option without having to redesign your flow.

Currently, she selects one person from the list and that opens a screen with the choice component where she can select the person from that list. That selection is written to the current record “roommate” field. Then she must go out to the first list and select the person that was just added as a roommate and do the reverse to add the roommate to complete the “relationship” between the two. Hope that makes sense,

Yep, that makes sense.

Okay, this is what you can do:

  • Add a single relation column in your Members table that matches the Room Mate column with the Name column.
  • Add a Button below the choice component, and configure it to do a Set Column Values action via the single relation, setting the Room Mate column to the value of the Member name from the current screen.

That’s all you’ll need. Just tell your wife that after selecting the Room Mate, she just needs to click the button.

1 Like

ok I added a relation column in Members Table that relates Room Mate with Name column called rel_name_roommate. Now that column has the same data as the Roommate column.
Added button and configured Set Column Values action to set Roommate column to the value of Members name but that simply places the name of the first record chosen prior to selecting “roommate” in the rel_name_roommate column which was already there prior to the relation field being added.

I am sure i am missing some simply detail here…sorry.

Will try to do a video.

Here is a video that attempts to show and explain.

Jerry

From “Darren Murphy via Glide Community” <notifications@glideapps.discoursemail.com>
To jerryrankin@gmail.com
Date 4/3/2024 9:17:48 AM
Subject [Glide Community] [Ask for Help] Update data in 2 records at once

By the way I cannot see the rel_name_roommate in the set data fields to choose from …

Jerry

From “Darren Murphy via Glide Community” <notifications@glideapps.discoursemail.com>
To jerryrankin@gmail.com
Date 4/3/2024 9:17:48 AM
Subject [Glide Community] [Ask for Help] Update data in 2 records at once

The Row setting in the Set Column action for the button should be using the relation. You have it set to This Item, so it’s only updating the current row instead of updating the related row. You have to use the relation you created.

2 Likes

Ok…just one more proof or reason that I love this product and especially the amazing community around it! Thanks for the patience!!! It works when you set it up correctly!

From “Jeff Hager via Glide Community” <notifications@glideapps.discoursemail.com>
To jerryrankin@gmail.com
Date 4/3/2024 2:13:26 PM
Subject [Glide Community] [Ask for Help] Update data in 2 records at once

2 Likes