Hi,
How can i see in runtime if a field has a Auto enter defined using metadata?
I have a function which checks for required (non nullable) fields but I want to exclude fields with auto enter.
Thx
Hi,
How can i see in runtime if a field has a Auto enter defined using metadata?
I have a function which checks for required (non nullable) fields but I want to exclude fields with auto enter.
Thx
When I understand you right, I do not see the necessity of this.
Because when there are auto enter fields, those fields get values anyway, so checking required fields can also check those autoenter fields without harm.
We do the complete autoenter task with own sourcecode that runs when a new record gets created.
The advantage is that we can use the if-condition where necessary, and we have a better overview over those fields.
Also those fields will get found by a global search for a field name, which is also of value in some cases.
Additionally we use an own meta table to create autoenter values for specific tenants.
So when a customer wants a field always with a specific value at once, that is possible only for that customer.
Hi Bernd,
Your system seems more efficient.
Problem is that I have to verify an Import-source where those auto-enter fields may or may not exist.
So I have to give the warning 'value for required field missing" in quite an early stage, before creating the records.
That’s why I need to figure out if a value is missing for a non- auto enter field.
Here is listed that there are those properties available:
https://wiki.servoy.com/display/public/DOCS/ColumnInfo
However I can not see how they can be retrieved.
If nobody else can tell a function for this, you could check the format of the Servoy repository and retrieve that information from there directly.
Because it should be inside there.
In the end, I resolved it by issuing newRecord and checking the import-data with the newRecord values.
And ofcourse clearing the foudnset so the dummy- newrecord wasn’t saved.
Would be great if Servoy provided the ability to work with nested transactions, then I could simply issue a rollback on my newRecord.
Thx
developers10:
Would be great if Servoy provided the ability to work with nested transactions, then I could simply issue a rollback on my newRecord.
You could simply delete the record from the foundset. If it was already saved it deletes it from the database, if it wasn’t it just gets removed from the in-memory foundset. No real need for nested transactions there.
Or am I missing a use-case here where you really need nested transactions for this?
Hi Robert,
Ofcourse, you are right, that’s also what I do, but I just don’t like this methodology.
One should be able to either create a new record which doesn’t get saved automatically or have the ability to isolate certain operations in it’s own transaction.