I am building an app for data entry/editing and have a sqlite database table with a foreign key to another table with the related information
On loading a view I need an text input to show the lookup value of an id in a field and if it is edited show the new value, and then save the new id.
So I am looking for the best option for a input box dropdown to pick 1 item from up from up to 100 items and then store the id for that chosen value. Any suggestions for the best type of input to use. Also not sure what would be the most efficient way to create the list data for the input. Have been looking at lists, maps and custom objects but not sure which would be best to use. Have been looking for ideas through the forum but still not sure what is the best combination of input type and list data to use.
Being able to display more than one column in the dropdown list would be useful as well.
I am building an app for data entry/editing and have a sqlite database table with a foreign key to another table with the related information
On loading a view I need an text input to show the lookup value of an id in a field and if it is edited show the new value, and then save the new id.
So I am looking for the best option for a input box dropdown to pick 1 item from up from up to 100 items and then store the id for that chosen value. Any suggestions for the best type of input to use. Also not sure what would be the most efficient way to create the list data for the input. Have been looking at lists, maps and custom objects but not sure which would be best to use. Have been looking for ideas through the forum but still not sure what is the best combination of input type and list data to use.
Being able to display more than one column in the dropdown list would be useful as well.
Will do, any suggestions for best way to deal with a hidden id, if it is based on a list view then I dont think it will have tag property for each line
If you're creating the control, you can create a custom type that contains all of the identifying information you require, in addition to the listview entry itself if necessary for reference.
If you're creating the control, you can create a custom type that contains all of the identifying information you require, in addition to the listview entry itself if necessary for reference.
I think so, if I understand what you're asking. I needed a similar control for a project for a while back, it's basically a listview with an option button with the list item. You give the item an ID and an event is raised when they select a different option. I've attached an example project of the control to this post, perhaps you can gain some insight from going through it.
I think so, if I understand what you're asking. I needed a similar control for a project for a while back, it's basically a listview with an option button with the list item. You give the item an ID and an event is raised when they select a different option. I've attached an example project of the control to this post, perhaps you can gain some insight from going through it.
Thanks for the example, only a week into B4A so good to see how things can be done in different ways. So I could add any ID value to the foList.AddItem( ID as string,.. and retrieve it on selected, and the listview would be sorted by the order added not the ID.