Hi All
A v10.4.01 question.
I would like to suppress the message:
0129 Error on field FieldName; value is required.
My current setup is :-
Entity: subtype locking=Y(cautious)
Component: Database Access=N(None)
The hope being that database access=none would stop any validation but it does not.
The fix is to set Entity: subtype locking=N(NoUpdates)
The question is if I can have an entity subtype that can be used for database base access, but at component level could also be turned off.
In old uniface versions, locking 'no updates' at frm level is an option.
------------------------------
Osman Man
Uniface Community Edition Shared Account
US
------------------------------
Hi Osman,
Error 0129 has nothing to do with locking, AFAIK it is related to primary key completition.
To avoid it IMHO you could either:
1) Simply fill the missing field with a default value
2) Use the OnError trigger at entity level to strip just the message at the moment, filling it in a later stage
Hope it helps.
Regards,
Gianni
------------------------------
Gianni Sandigliano
IT
------------------------------
Hi Osman,
Error 0129 has nothing to do with locking, AFAIK it is related to primary key completition.
To avoid it IMHO you could either:
1) Simply fill the missing field with a default value
2) Use the OnError trigger at entity level to strip just the message at the moment, filling it in a later stage
Hope it helps.
Regards,
Gianni
------------------------------
Gianni Sandigliano
IT
------------------------------
Hi Gianni
Thanks for the feedback.
I tried the error trigger at field level, which works... the entity triggers did not get fired as the error was at field level.
My preferred solution is still not getting to the error trigger in the first place.
I am pretty sure setting locking to Noupdates in the entity model is the best place for it.
I am guessing that uniface is now intended to have subtypes that access the database and subtypes that don't; hence the various subtype palette templates(subtype, db via entity service, db via path, no db access).
I think a slight oversight(bug/nice to have), is that if you choose a subtype with no db access then the locking must only be 'no updates'
Regards
Osman
------------------------------
Osman Man
Uniface Community Edition Shared Account
US
------------------------------
Hi Gianni
Thanks for the feedback.
I tried the error trigger at field level, which works... the entity triggers did not get fired as the error was at field level.
My preferred solution is still not getting to the error trigger in the first place.
I am pretty sure setting locking to Noupdates in the entity model is the best place for it.
I am guessing that uniface is now intended to have subtypes that access the database and subtypes that don't; hence the various subtype palette templates(subtype, db via entity service, db via path, no db access).
I think a slight oversight(bug/nice to have), is that if you choose a subtype with no db access then the locking must only be 'no updates'
Regards
Osman
------------------------------
Osman Man
Uniface Community Edition Shared Account
US
------------------------------
Hello Osman
Have you tried the asn setting
$validation=LIMITED
From the library:
LIMITED-use the default functionality in versions prior to V7.2. This means that declarative checks are performed when the user modifies an occurrence.
COMPLETE-ensure the validation of all modified data in the component, regardless of how it was modified. Default if setting is omitted.
Best regards
Peter Beugel
Principal Technical Support Engineer
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
Hello Osman
Have you tried the asn setting
$validation=LIMITED
From the library:
LIMITED-use the default functionality in versions prior to V7.2. This means that declarative checks are performed when the user modifies an occurrence.
COMPLETE-ensure the validation of all modified data in the component, regardless of how it was modified. Default if setting is omitted.
Best regards
Peter Beugel
Principal Technical Support Engineer
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
Thanks Peter... That explains it...
------------------------------
Osman Man
Uniface Community Edition Shared Account
US
------------------------------
Hi All
A v10.4.01 question.
I would like to suppress the message:
0129 Error on field FieldName; value is required.
My current setup is :-
Entity: subtype locking=Y(cautious)
Component: Database Access=N(None)
The hope being that database access=none would stop any validation but it does not.
The fix is to set Entity: subtype locking=N(NoUpdates)
The question is if I can have an entity subtype that can be used for database base access, but at component level could also be turned off.
In old uniface versions, locking 'no updates' at frm level is an option.
------------------------------
Osman Man
Uniface Community Edition Shared Account
US
------------------------------
Hi Osman,
Another option would be to declare the field in question with a LEN(0-0) - thus
over-riding the MANdatory check which causes the 0129 error...
This way, you can also 'delay' the generation of a technical key until the
write trigger...
if ($storetype = 1)
; generate technical key
endif
write
Regards,
Knut
------------------------------
Knut Dybendahl
Florida Department of Highway Safety & Motor Vehicles
------------------------------
Hi Osman,
Another option would be to declare the field in question with a LEN(0-0) - thus
over-riding the MANdatory check which causes the 0129 error...
This way, you can also 'delay' the generation of a technical key until the
write trigger...
if ($storetype = 1)
; generate technical key
endif
write
Regards,
Knut
------------------------------
Knut Dybendahl
Florida Department of Highway Safety & Motor Vehicles
------------------------------
Thanks Knut... I remember using that approach in the past....
------------------------------
Osman Man
Uniface Community Edition Shared Account
US
------------------------------