BaanTech
18th September 2002, 21:24
I need to make the Supplier Invoice No. field mandatory in tfacp1100m000. Sounds simple enough, merely mark off the
Mandatory Input option on the form field.

Ya right ...

As per the Baan help on this field : "You can only change “Mandatory Input”, when it is not a table field. If it is a table field the indication “mandatory input” is specified in the table field data (ttadv4122s000)."

If we modify the table then we will have an issue with records where current values are 0 for this field. If we attempt to update the script we have no way of guaranteeing the code we update is equivalent to the contents of the current object (we could do ‘what’ on the object etc., but we would prefer to avoid changing code) ... and at this point we have no tool in place to modify around the 4gl events etc...

I've tried changing the value to Yes via GTM on ttadv301 and
redumped the form, but still no luck.

I can understand why Baan would restrict modifying mandatory input on the form to 'No' when the table is 'Yes', but why would they restrict modifying mandatory input on the form to 'Yes' when the table is 'Yes' ?

We're on IVc3.

PS. I still need to check the Baan website for a solution.

Thanks.

BaanTech

gfasbender
18th September 2002, 21:53
You can put code into the scripts field event to simulate the mandatory condition you're looking for. Try


field.tfacp100.????:
check.input:
if isspace(tfacp100.????) then
set.input.error("")
message("Supplier Invoice No. is required")
endif

Neal Matthews
19th September 2002, 10:44
We did this same exercise by changing the table tfacp200 and had very few problems with the records where we had 0 for the isup field.

From memory we got the occasional message from cash type sessions which didn't like our blank isup records.

In retrospect the only thing I'd do different is probably pick up the blank recs in GTM and change the isup field to something like ".".

I must confess at the time I didn't really understand why I just couldn't change the form.

Regards
Neal Matthews
Intier Automotive - IT Support Analyst

Armando_Rod2000
20th September 2002, 17:14
The way to solve this problem is modifying the table and soon compiling the data dictionary, then you will to control the field mandatory field from the screen. In opposite case you will to use the program events.

field.xxxxxx:
before.input:
bla,bla,bla

check.input:
if isspace(field.xxxxxx) then
set.input.error("bla, bla, bla",1)
endif


after.input:
bla,bla,bla

when.fields.change:
bla,bla,bla