cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

ModelCHECK: Optional Parameters

N.Barnes
12-Amethyst

ModelCHECK: Optional Parameters

I have a ModelCHECK use case where some parameters may or may not exist.  I have discovered that if I only list the name of the parameter, then ModelCHECK will not report the parameter as "extra".  But if I add extra requirements to the parameter in the .mcs file then ModelCHECK considers the parameter as "required."   I would prefer to continue to check for "extra parameters" as defined in the conditions file.

 

Can I define the con which is.   "If the parameter exists then it must be a string"

 

In this case "the parameter may exist"

PRT_PARAMETER NOTE

 

In this case "the parameter is required and must be a string"

PRT_PARAMETER NOTE STR

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @N.Barnes 

 

There is no direct option just to check the parameter type, if we use PRT_PARAMETER PARAM_NAME STR EQ *, it will check the parameter and type but create a conflict with existing value of parameter. for example if a parameter "NUMBER" is of real number type with some defined value, when converting it will conflict with string  and may not output as expected. 

 

Thanks. 

View solution in original post

2 REPLIES 2
N.Barnes
12-Amethyst
(To:N.Barnes)

Spelling Correction:  Can I define the condition which is  "If the parameter exists then it must be a string"

Hi @N.Barnes 

 

There is no direct option just to check the parameter type, if we use PRT_PARAMETER PARAM_NAME STR EQ *, it will check the parameter and type but create a conflict with existing value of parameter. for example if a parameter "NUMBER" is of real number type with some defined value, when converting it will conflict with string  and may not output as expected. 

 

Thanks. 

Top Tags