A quick rundown:
App to track associations between SIM cards (ID’d by SIM #) and ‘devices’ (ID’d by Device IMEI), and devices installed on vehicles (ID’d by VIN).
Each ‘Device’ record includes a connection the SIM currently used in the device, and the “Last known vehicle” (typically, the current vehicle) the device was installed in.
Each ‘SIM’ record includes a connection to the ‘last know device’ (typically, the current device)
Each ‘Vehicle’ record includes a connection to multiple devices, as multiple devices can be in a single vehicle.
The purpose is to keep track of what SIM is in each device currently, as well as what device a SIM card was last used in, in the event that the SIM is physically exchanged (which replaces the association between the two from the ‘Device’ record perspective). Usually, ‘last known’ will be the current association, but this connection needs to exist, even if the device is removed from the vehicle, or the SIM is removed from the device. Maintaining these associations are necessary for a number of reasons.
The issue I am running in to, is assigning the ‘last know device’ for each SIM record.
I have a table of devices, with a button for an edit popup. That popup contains a form with the Device IMEI (read-only), and an entry to assign a SIM. This association works correctly. I created a record rule to update connected record for Last Known Device for the SIM. I have tried defining the “last know device” using both the (Record ID) and the [form value] Device IMEI, and in neither case does it update the SIM record correctly; as in attach the device being edited in the current form as the ‘last known device’ for the SIM. I know there’s something simple I’m missing, but I just can’t get it to click. I have the same scenario with assigning ‘last known vehicle’ to each device, with the forms and tables setup up the same way.