How can I link a single uploaded image to multiple records

Answered

The scenario is as follows:

  1. I have a field in a table for status
  2. Status can only have 2 values, active and inactive
  3. I have uploaded 2 icons to public files, one for active and the other for inactive

How can I store the 'inactive' image against each record that is inactive?

Alternatively, when creating an endpoint returning the record with a status, how do I attach the 'inactive' image with an inactive status?

Essentially the question is, how do I use a single image against multiple records?

2 replies