Union type in data models

I have a data model in which is encoded a list, with each element of the list being a reference to either a game type 1 or game type 2. At the moment I have a flag to say which type and then both types. This is a bit ugly, and I was wondering if there is anyway I can do this using a union-type?

Hi Richard,

To make sure I’m understanding correctly, you would like to add a reference type input to select from multiple models? Is that right?

Yes. I have a ‘plan’ which can be either plan 1 or plan 2. Today I have an enum (Plan1, plan2) and then two references to the different plans. This is workable, but does offer the opportunity for an error (someone fills out both plans or fills out one plan and sets the enum to the other plan). It would be nice to be able to tie the enum to the plan so these errors can’t happen.

Hi @Richard_at_the_pools,

Thanks for clarifying that! Currently, there isn’t any way to do this, but I see how helpful that would be. I’m going to send this suggestion over to our product team :raised_hands: . It would be great if you could also add this to our ideas forum: https://ideas.builder.io/