Enumlist Base Type: Ref --> Add New Value --> form with prepopulated dereference column?

Hi All

I have a parent table โ€œWork Ordersโ€, and a child table โ€œEquipments,โ€ where Equipment is part of the " Work Orders" table. I want the users to be able to select which equipments they are working on for the work order, or be able to add a new equipment to the work order. I create an Enumlist column in work order table with base type Ref and select equipment table as referenced table. The enumlist works fine. However, when a user tries to add an equipment in this work order by clicking โ€œaddโ€ under enumlist dropdown, and it goes to the โ€œEquipment_Form,โ€ the column โ€œAssociated Work Orderโ€ cannot auto-populate (not able to dereference?).

I know only โ€œREF_ROWSโ€ formula can do the trick to have auto-populated column. I am just wondering if there is any other way to work around it? Or if there is any better way to achieve this?

Thanks !!!

0 4 159
4 REPLIES 4

There is no way to auto-populate when going through the โ€œAddโ€ selection in an EnumListโ€™s dropdown.

But seeing your situation, Iโ€™m wondering how the โ€œAssociated Work Orderโ€ column in your Equipment Table is being updated in any case, whether adding a new record or not? Can the user just add an Equipment record through the dropdown โ€œaddโ€, and then select it and proceed the same that they would if just selecting an existing record?

I also imagine your data structure is probably not optimally built here. Iโ€™d suggest a third Table, โ€œwork_order_equipmentโ€, that has 2 Ref columns, one to Work Order, and one to Equipment. This is a child Table to a Work Order.

Do some research on โ€œmany to manyโ€ relationships for more info.

https://community.appsheet.com/search?q=many%20to%20many

Hi, Thanks for your reply! I actually follow the method by this many to many relationship article (Many-to-Many Relationships). This allows the users to select an equipment in the Work Order form (the enumlist base type ref) and allows them to add a new equipment if needed. I also put a formula in โ€œInitial Valueโ€ in enumlist column:

UNIQUE([_THIS] + LIST(MAXROW(โ€œEquipmentโ€, โ€œ_ROWNUMBERโ€, [Associated Work Orders] = [Work Orders Key])))

so the newly added equipment will automatically be selected in this work order.

On another note, regarding adding a third table, are you referring to the method mentioned here (Help with many-to-many reference and bridge table) about having a bridge table?

It would be great if you could elaborate more on how this third table will work, as we actually have a lot of tables that IsPartOf or referencing Work Orders or each other at the same time (eg. Clients, Receipts, Materialsโ€ฆ). Thus, I am wondering if a third table is needed for every reference relationshipโ€ฆ?

Thanks so much!!

Yes, it is commonly called a โ€œbridge tableโ€. Iโ€™m not 100% if it is appropriate for your app though. Is an Equipment record a unique physical object that can only be part of a single Work Order?

Iโ€™m really not sure what else to elaborate on about โ€œbridgeโ€ or โ€œjoinโ€ tables. But maybe you can do a google search about those terms, or โ€œdata normalizationโ€, to gain more insight?


There really isnโ€™t an always-correct way about it. It all depends on the functionality you expect, your exact implementation, and the desired user interface. Sorry I canโ€™t say much more here , the โ€œdatabase normalizationโ€ subject is pretty in-depth.


Hmm. Iโ€™m not really sure what the point of this expression is. Iโ€™m not seeing how it would be helping you in any way.

Thanks so much for your time and explanation! Will look into it.

Top Labels in this Space