ltannous
28th October 2004, 20:54
I have a domain in my table that is a string tdssc.cref.c(pronumber). How can I say that when a user tabs past this domain, it cannot be left blank. I do not want to make this a mandatory input field in the table def. How can I appy this to the domain.
Reason: This field can be by passed if a flag in the customer del. address says that a pronumber = no. When the flag is set to yes, the session allows me to tab to the pronumber field, and tab past it with no entry.
By making it mandatory in the table def, if i had the the pronumber flag set to no, the current session still requires a pronumber, eventhough it does not allow me to select the field.
I do not have source code for the session.
lbencic
28th October 2004, 21:12
I'm pretty sure that this requires a programming change, you can not conditionally set things in the domain, or even the table for that matter.
You can use a wrapper tool (RMCgen (my company), QKEY (Fullscope) or the freeware 'rush' on these boards) to add the validation/field control you want to the Baan script, even without source.
mark_h
28th October 2004, 21:13
Check out the extend source code posts - there is RMCis, Qkey and the freeware posted in the code and utilities session. With one of these products you can put a check.input section on the field and make sure it is filled. The first solution I thought of.
Mark
ltannous
29th October 2004, 04:46
The domain works with the current program. Is there a way to set my criiteria in the domain set up. I can sepcify legal charachers, by how can i say that a blank filed is illegal
mark_h
29th October 2004, 15:36
What I do not think you can do with the domain is allow the field to be blank when the pronumber flag is set to no. I know you could set up a range, but I do not see anyway to skip that check when the flag is set to no. I have never setup a range so I do not know a whole lot about them. The only way I can think of to do what you are asking, is to use one of the methods that Lisa or I mentioned.
Mark
Hitesh Shah
2nd November 2004, 18:00
The domain works with the current program. Is there a way to set my criiteria in the domain set up. I can sepcify legal charachers, by how can i say that a blank filed is illegal
True domain works with the program. As Mark said one can do with domain range . But this will always require that flag to be declared extern and available when domain checks are carried out (like field entry, table updation and import from sequential dump).
e.g
pronum=2 ? strip($$) in "..*" : strip($$) in ".*"
|2 for tcyesno.no
But definitely u will agree variable or table field pronum will not always be available when domain checks are carried (as described earlier). So the alternative approaches to this may be explored.