I have a complex DB (15+ tables) and my app often needs to read, alter or write to the tables.
A few of the tables contain also fields like the path to an imagefile and many other information, so I was thinking about creating types for holding the values and storing these variables in lists.
Maybe maps...
But I often need listviews or something similar which just have to show e.g. one of the fields, e.g. the name of a person. For this I tried comboboxes. For feeding the combobox a list which is filled with strings would be fine, but the list contains the variable according to the type-declaration. I don´t want to always have to create a second list with only the one field just for beeing able to fill the combobox.
What is recommended for this kind of problem?
I dream of possibilities like (pure imagination):
Are there possibilities like the ones drafted above in the imaginary code???
A few of the tables contain also fields like the path to an imagefile and many other information, so I was thinking about creating types for holding the values and storing these variables in lists.
Maybe maps...
But I often need listviews or something similar which just have to show e.g. one of the fields, e.g. the name of a person. For this I tried comboboxes. For feeding the combobox a list which is filled with strings would be fine, but the list contains the variable according to the type-declaration. I don´t want to always have to create a second list with only the one field just for beeing able to fill the combobox.
What is recommended for this kind of problem?
I dream of possibilities like (pure imagination):
B4X:
type person(name as string, age as int)
private listPersons as person: listPersons.initialize
listPersons.add(.name="Mike", .age=40)
listPersons.add(.name="James", .age=30)
combobox1.addall(listPersons(.name))
log(listPersons.get(1).name)
Are there possibilities like the ones drafted above in the imaginary code???