Inscrit le: 08 Déc 2017
|Posté le: Mer 18 Avr - 13:13 (2018) Sujet du message: Possible Bug - Parent/Child Object Issues
I want to limit the number of child objects that a parent can have. So I setup a rule in the Parent Object.
IF LIST_SIZE(Parent.Children) > 1 THEN REPORT ERROR
The parent object is a new unsaved object and then children objects are being added using Add New Reference.
Adding the child object is fine. The problem is when I add more than 1 object (I put it to one just for easy testing), LIST_SIZE doesn't update properly. It stays stuck at 1 in the log. So it never triggers the Error.
Ideally what I'd like to do is prevent the user from even trying to add a new reference if there's x number of children already in the list if anyone has a way of doing that. I figured worse case is I could trigger an error after x number of child objects.
Any help will be apprecited.
I didn't find the right solution from the Internet.
Motion graphics company