Maintenance requests types and sub-types

Hi, I’m very new to Bubble, busy completing courses to learn how to build my own apps.

I’m currently busy with a maintenance request app where I need to choose a type and sub-type for a specific maintenance request, For example, Type: Electrical, Sub-type: Electrical transformer, Power factor, Main distribution board etc.

I will also be creating an asset register that forms part of the app where maintenance requests will be linked to a specific asset in the asset register, here again there will be Types and Sub-types, for example, Type: HVAC, Sub-type: Package units, Split units, Cassette units.

When creating maintenance requests users will have to choose between the types and linked sub-types and the same goes for the assets.

What is the best way for me to accomplish this in terms of database design.

Thank you in advance.

I’d probably do things exactly as you’ve already described… i.e. have a separate datatype for type and subtype, with each subtype relating to a parent type.

You could argue it’s simpler just to use a single datatype for everything, - but purely for ease organisation I’d use two… and the same goes for the maintenance request types.

You could also use Option Sets instead of datatypes for this - there are pros and cons of doing so, and it really depends on the number of items, and how/how often they ned to be created or changed as to what might work better for your use case - so do some research into the pros and cons of each in order to decide what will be best for your app.

1 Like

Thank you @adamhholmes