I have a Combo-Box based on a valuelist on a Form.
Beside the Combo-Box I have a Button, with this button I’m creating new values in the Table the valuelist is based on.
When I create a new value in the DB, my Combo-Box is not refreshed whit the new data.
Closing the form and opening again is my workaround right now.
Where or how I have to do that?
When I delete a value, the Combo-Box is refreshed! I would lick it the same way when I create one!
Regards
ttmgybta
So I found out how my Value comes in to the Combo-Box.
I also set the variable for the Combo-Box, but how does the Combo-Box select my new value?
what kind of valuelist are you using?
I use a “Table Value” Valuelist.
how many items do you already show in that list?
Are there more then 500? Because a db valuelist will not load anymore values then 500
There are about 10 records that I show in the Valuelist.
The new record is shown in the Combobox but I can’t focus on it right away after creation.
how do you focus it right away?
Buy just opening up the combobox and then selecting the new value?
I can do that just fine.
Also selecting it right after saving the new record also works just fine.
function onAction(event) {
var fs = databaseManager.getFoundSet("example_data","test");
var record = fs.getRecord(fs.newRecord());
record.test= "test_" + Math.random();
databaseManager.saveData();
// set the dataprovider that the combo box uses:
globals.progress_form = record.test;
}
Hello Johan
I found my mistake!
I set the wrong value in to the global variable.
Thanks for your help