List of elements with two attributes

Hi everyone,

Here is the context, I have a thing called Lithology with a bunch of attributes, one of them is Foreign Material, and each Foreign Material has a name and an (optional) image.

There is two types of Foreign Material: common ones (a predefined list for every user) and specific ones (created by the user and only visible to him).

When a user creates a new Lithology, he has to fill every attribute, including Foreign Material. He can select several of them, and for each, he has to select a quantity (Few, Some or A lot).

After that, the user is still able to edit the Lithology and everything it contains.

For now, I set Foreign Material as a thing, with a predefined list.

But I have trouble with quantity: I didn’t find a way to save name AND quantity of several Foreign Materials in a Lithology, without editing the predefined list to keep it clean for the other users (who using the app in the same time).

Do you have any idea of how to store these data?

Thanks a lot for your help! :slight_smile:


@Noel Could you share a snapshot of your database structure or link to a test app? If you have Thing with fields Type, Selection (list), Quantity - based on type, you can allow editing selection and quantity.

Hi @neerja, I made a test app here:

In short, I have to save every Foreign Element selected and its Quantity in the Lithology.
But I can’t directly link Quantity to each Foreign Element, because it will change it for every user.

For now, I store clicked Foreign Elements in a temporary list in the Lithology (to not change the definitive list before clicking on the button) and I use it to show which ones are selected (but it’s a bit slow, I think that it is not an efficient way to proceed).

EDIT: As a last resort, I could store it in a list like this {rubber1, glass3}, combining Foreign Element’s name and Quantity value, but it will be pretty hard to reuse