Option to turn off setting default values for fields

Forum to discuss the new web client version of Servoy.

Option to turn off setting default values for fields

Postby rph » Tue Jan 14, 2025 7:08 pm

Hi

We've got the following issue since TiNG (we use Servoy 2024.03.3 LTS):

In solution-open we set tablefilters like
Code: Select all
databaseManager.addTableFilterParam("testdb", "city", "city_id", "IN", arrayOfCities, "myfilter");
so a user can have access to one or multiple items of the table "city".

Now, when I want to add a new record in a form where the field "city_id" is used as a foreign key (and I have for example a Combobox) then the first value of the arrayOfCities will be used as the default value for city_id. This is new in TiNG (in NG1 the value remains NULL until we explicitly define a value). Is it possible to change this behaviour somehow globally? We want the user chose a value deliberately. Otherwise the validation always returns true but the user is not aware that there is a default value in this specific field and he could/should change it.

Of course I know, we could go everywhere in the code and set the NULL-value explicitly after the newRecord, but this is quite ugly, because we have a lot of such forms around and we have to check everywhere.

Thanks in advance for any suggestions.

Best
Roland
rph
 
Posts: 98
Joined: Wed Aug 10, 2011 11:44 am
Location: Cham, Switzerland

Return to Servoy NGClient

Who is online

Users browsing this forum: Bing [Bot] and 2 guests