‎20-01-2022 11:58 PM
Hi all,
I am running HOEX V4 CP2 and want to make a form field mandatory.
The documentation says to add the Mandatory(Always) control to the Item, which I did.
My code in the PropertyPage: businessLines=Item([Category <Business Line>]),Contains(AppsMap),Control(ListView),Name(Ministerial Responsibility),Title(Left),Param(NoDefaultColumn),Mandatory(Always) |
When you open the object you get a nice red * next to the field title, but I am still able to remove the contents of the field and leave it blank. There does not appear to be any mandatory validation on the field.
I updated the creation wizard using exactly the same line of code and this worked. It prevents the object from being created when the field is null. But this is pretty useless if I cannot prevent the users deleting the content after creation.
So my question is pretty simple, how can I make this field mandatory (ie: cannot be null)?
Thanks.
‎07-02-2022 02:23 AM
I have tried defining an attribute within the list view and making that mandatory, but that doesn't work either.
The only thing that seems to work is if I change the mutiplicity from Many to 1 and force the entry through the metaassociation. This is really bad because it means I go from an extension to a customisation. The MetaAssociation I am trying to force is the standard Category (Business Line) association and customising it shouldn't be necessary surely.
‎31-01-2022 05:18 AM
Hi Lionel,
Thanks for your reply.
Why I say V4 is broken is because I have added the Mandatory control as per the documentation and it doesn't work.
No, I didn't have it working in previous versions. This is the first time I have tried it.
Is it the official Mega position that the Mandatory control does not work for Listviews?
@lionel wrote:It works only for metaAttributes (in a listview or not), or for links displayed as metaAttributes.
Does this mean I can define an attribute within the listview and make that mandatory?
‎28-01-2022 12:13 PM
Hi there,
when you say that V4 is broken, does that mean that you had it work in previous version ?
I think that the mandatory option is not available for a listview. It works only for metaAttributes (in a listview or not), or for links displayed as metaAttributes.
‎27-01-2022 11:34 PM
Has anyone ever made a field mandatory? If so how did they do it?
‎24-01-2022 06:52 AM - edited ‎24-01-2022 06:56 AM
Hi Philip,
Thanks for the suggestion. I tried Mandatory(True), Mandatory(Yes) and Mandatory(Always).
All three do the same thing. They give my the red * (Mandatory indicator), but there is no mandatory control on the field.
It really seems like something in HOPEX V4 is broken.
‎21-01-2022 04:56 PM
Hi Todd,
Have you tried Mandatory(True) instead of Mandatory(Always)? See if that works.
Thanks,
Philip
Technical Support Engineer