Page 1 of 1
legend logic to find empty cells in Satisfied By column

Posted:
Mon Apr 29, 2019 10:28 am
by justin.berrier@navy.mil
I'm trying to create logic for use with a legend item to find empty cells in the Satisfied By column of a sysml requirements table, but I'm having trouble doing so. Anyone have experience doing this?
Re: legend logic to find empty cells in Satisfied By column

Posted:
Tue Apr 05, 2022 1:28 pm
by mbseason
I see this is an old post, but a good question.
I had the same issue trying to create expressions to return true if certain properties were empty.
The best way I was able to address this issue was to create a Script under the Elements by Condition section on the Legend Item specification.
Create operation -> Script
Language:
OCL2.0
Body:
if self.propertyOfInterest->notEmpty() then
false
else
true
endif
I am no expert in OCL so there may be a better way to do this. However, this worked for me. Just make sure the Element Type of the table is the owner of this property (i.e., self) and replace propertyOfInterest with whatever property it is that you are checking to see if it is empty.
Hope this is helpful to someone out there!
Re: legend logic to find empty cells in Satisfied By column

Posted:
Mon Nov 28, 2022 11:36 am
by marc.arias@lmco.com
Hello ,
How exactly would you do the following ? "Just make sure the Element Type of the table is the owner of this property (i.e., self) " What methods would you use for this ?
I am running into an issue where I create a property Instance and I am getting a Element has no Owner error
Re: legend logic to find empty cells in Satisfied By column

Posted:
Tue Nov 29, 2022 12:46 pm
by marc.arias@lmco.com
marc.arias@lmco.com wrote:Hello ,
How exactly would you do the following ? "Just make sure the Element Type of the table is the owner of this property (i.e., self) " What methods would you use for this ?
I am running into an issue where I create a property Instance and I am getting a Element has no Owner error
I answered my own question and posted a reply on this forum post :
add-parameter-to-activity-parameter-node-t7678.html