"Assign" an item (row) from Table2 (w/ ref column) to a item (row) in Table1 (w/ auto reverse ref column)

I’m trying to make a computer inventory App.
So far, I’ve got 3 tables.

  • Computers
  • (computer) Parts
  • Parts Category.

Parts are assigned to computers.
Parts that are not assigned to a computer are filtered in a Slice called Available_Part

What I’m having trouble doing is the following.

On system generated Computer_Detail view, it shows the parts referenced to that computer.
As I don’t want users to be able to add parts from this view, I was able to hide the Parts Add action in the inline parts table in this view by using this action behavior condition:

Now I want to create an action that when clicked, shows a list of available parts (e.g. from the slice i created). Then, when on of this parts is clicked, it automatically updates that part’s [Computer] field to the computer I was in the Computer_Detail view.
Alternatively, it could open a form, with a dropdown of available parts.

So far, what I was able to create was an Computer Action, that links to a view of the Sliced Available_Part. From there users have to click on one of the parts, then the edit button, than change the Computer record from blank to the desired computer. Than save.

Thank you,

Here’s what I would do:

Add 2 new columns to Computer table

  1. [Selected Part], Ref to Available_Part
  2. [Current Computer], DateTime, hidden

Create a new Slice on Computer table, that only has the 2 new columns, as well as a Form view for this new slice.

Make sure [Selected Part] has a reset_on_edit expression, for context of the new Form view. Also this column to be hidden except for in that new view. Also this column be required in this view.

Create a LINKTOROW action from Computer_Detail to this new view.

Create a Grouped action to be run on Form Save of this new Form view, that does:

  1. Set [Current Computer] to UTCNOW()
  2. Execute an action on Availabe_Part table, run on LIST([Selected Part])
    2a. Set value of [Computer] to MAXROW( Computers , “Current Computer” )

Sounds complex, I know, but it makes it very user-friendly.