What is the best way to organize two similar database table into one referenced sheet?

Sorry if the question is confusing. Hopefully with more detail it will make sense. I'll list my notes because it helps me wrap my head around the challenge:

  • I have a database of Bills that were billed to me by various parties.
  • Some of these were People, and some of these were Companies.
  • For each row in my database of Bills, I have a Ref column cell(Ref Column) for the party that has sent me the bill. I would like both People and Companies to be an option for this reference. 
  • My Appsheet skills are still pretty limited at the moment. I don't know if it's possible to have both databases be available to one Ref column cell...
  • That said, I realize that I could just combine both Companies and People into one single database and tag them as either a company or a person.
  • However, in some case, certain People are members of Companies! This means they cannot be a part of the same sheet, because one is the parent of another in some cases.

Hopefully this is clear, I apologize if the formatting of my question is annoying! Thanks for your help!

0 2 30
2 REPLIES 2

You could evaluate to have an enum in the Bills table called say [Party Type] with options as "People" and "Companies"

You could then have two reference columns in the Bills table- one referencing "People" table and another referencing "Companies" table. Both these reference columns could have initial values as "".  You could use show_if constraint of these columns based on [Party Type] enum and show ay one reference column based on [Party Type]

The above approach just shows some possibilities that you can think of. Exact configuration will of course can be based on finer details of your app.

Thanks for the help! That's actually what I have now, but I hadn't thought to hide them with the Show If constraint. That might be the most simple solution and the most elegant, thanks very much!

Top Labels in this Space