Data design - add new attribute rows

Newbie, first question, my apologies if my search skills should have found the answer.

I have a table of Events and a table of Attributes. I have a table EventAttributes that holds the value for each attribute for each event. E.g.:

Events: Run, Swim
Attributes: Wet, Sneakers
EventAtributes:
Run, Wet, No
Run, Sneakers, Yes
Swim, Wet, Yes
Swim, Snaekers, No

When a new Event is added, I would like to create the rows in EventAttributes. E.g.
Add Event: Bike
Add EventAttributes:
Bike, Wet, ?
Bike, Sneakers, ?

Ideally, I’d like to be able to use any previously created Event to provide starting attributes for the new Event.

Any direction appreciated.

Hi, one way to achieve this is to create a set of “default” EventAttributes data that you can copy on creation of each new event. This default data should not link to any specific event.

For example, assuming your EventAttributes data type has the following fields: Event (reference to Event data type), Attribute (reference to Attribute data type), HasAttribute (yes/no), you could create the following set of default data:
empty, Wet, no
empty, Sneakers, no
etc

Then, in the workflow for creation of the event, you could create the following actions:

  • Create a new thing…
    Create a new Event
  • Copy a list of things…
    The list to copy is EventAttributes with a constraint where Event is empty. This will duplicate the “default” set.
  • Make changes to a list of things…
    List to change is the Result of Step 2
    Here you can change the Event field for each record to the Result of Step 1

So effectively, you’re duplicating the default list and assigning each EventAttribute to the new Event.

You could also use previous events as templates for default data in the same way if you like.

Please let me know if this make sense.

1 Like

Thank you, tremendous help. I followed this sequence:

  1. Input for new Event and drop-down for Event to copy attributes
  2. Create new Event
  3. Copy list of EventAttributes from Event selected in drop-down
  4. Change list from the Result of Step 2 to the Event from Step 1
1 Like