Main Content

isFilteredIn

Class: slreq.Justification
Package: slreq

Check filtered justifications

Syntax

tf = isFilteredIn(jt)

Description

tf = isFilteredIn(jt) checks if the justification, jt, is filtered in the Requirements Editor or Requirements Perspective and returns 1 if the justification is not filtered and 0 if the justification is filtered.

Input Arguments

expand all

Justification, specified as an slreq.Justification object.

Examples

expand all

This example shows how to check if a justification is filtered.

Load the crs_req_justs requirement set.

rs = slreq.open("crs_req_justs");

Find the justification with Index set to 5.

jt = find(rs,Index=5);

Check if the justification is filtered.

tf = isFilteredIn(jt)
tf = logical
   1

Create a filter called ContainerReqs. Use the ReqFilter property to define a filter that displays only requirements with Type set to Container.

myView = slreq.View.create("ContainerReqs");
myView.ReqFilter = "{'ReqType','Container'};"
myView = 
  View with properties:

          Name: 'ContainerReqs'
     ReqFilter: "{'ReqType','Container'};"
    LinkFilter: ''
          Host: ''

Apply the filter, then check if the justification is filtered.

activate(myView)
tf = isFilteredIn(jt)
tf = logical
   0

Clear the loaded requirement sets and close the Requirements Editor.

slreq.clear;

Tips

Version History

Introduced in R2022b