ShowMandatory - part 2

You might recall me writing on the new ShowMandatory property. The one you can now set on a page control showing a red astrix on the left side of the control. And that it will also shown when setting the NotBlank property on a primary key field.

By mere coincidence I ran into the following.

I created the following table having set NotBlank = Yes on the Primary Key field.

And a Card Page based on this table with ShowMandatory = TRUE on all non-PK controls.

You see? No astrixes for the Amount and Reference ID fields. Even though I did not enter any value, so from my perspective they are still empty.

It appears that ShowMandatory checks the content of the control itself and not the value of the field bounded to the control. Of course we could argue whether a zero Amount field is empty or not as zero is a value too.

Now if you want to have the asterix shown on these two fields you have to make sure that the control is empty.

This can easily be done by setting the BlankZero or BlankNumbers property (on either the table field or the page control), but only seems to work for the numerical data types, so ...

Won't work for the Reference ID field (GUID) out of the box. I recon you could do something with a control addin, but haven't tried it (yet).

Anonymous

Hi Luc,

I understand your point, but would you really want to enforce a user typing a GUID? Seems very user unfriendly to me.