| EVL constraints [message #1059034] |
Thu, 16 May 2013 07:06  |
serhat gezgin Messages: 136 Registered: January 2013 Location: Izmir |
Senior Member |
|
|
Hi all,
When i write this validation to my model;
constraint doldur {
guard : self.satisfies('IllegalCharactersForName')
check {
if(self.ownedField.select(f | f.name = "Text").size() <> 1){
var text = new TextField;
text.name = "Text";
text.displayName = "Text";
self.ownedField.add(text);
}
if(self.ownedField.excludes(text)){
return false;
}
return true;
}
message : 'laaaa'
}
i always get error (atached picture and txt file shows error)
But i need to create element from validation so how can i do this
anyone can help me ?
Regards
Attachment: EVLError.png
(Size: 222.71KB, Downloaded 7 times)
Attachment: EVLError.txt
(Size: 17.02KB, Downloaded 7 times)
[Updated on: Thu, 16 May 2013 07:08] Report message to a moderator
|
|
|
| Re: EVL constraints [message #1059421 is a reply to message #1059034] |
Sat, 18 May 2013 04:44  |
Ralph Gerbig Messages: 555 Registered: November 2009 |
Senior Member |
|
|
Hi,
the check constraint of an EVL expression is there to check the model element as it is. I think what you should do is to offer a quick fix via evl. Maybe there you do not have a read only transaction.
Ralph
|
|
|
Powered by
FUDForum. Page generated in 0.06030 seconds