ATE (large)

Welcome to the COE Discussion Forums! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.


 

Follow COE on

COE DISCUSSION FORUM
Case Sensitivity in Use of Rules
Last Post 16 Nov 2009 03:24 PM by BAREFTRZ. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
BAREFTRZ
Occasional Poster
Occasional Poster
Posts:3


--
14 Nov 2009 12:24 PM  

I have created a rule that evaluates a users input to a parameter, however, I have found that the rule is case sensitive and if the user uses lower case then the output parameters do not update. Here is a small snipet of the rule.

if `INDEX_LOCATION` == "FRONT"

{
 `INDEX` = "FWD"
}

if `INDEX_LOCATION` == "REAR"

{
 `INDEX` = "AFT"
}

I need to be able to recognize lowercase inputs to the parameter "INDEX_LOCATION".

CLIFFJOHNSON
500+ Poster
500+ Poster
Posts:553
Avatar


--
14 Nov 2009 01:00 PM  

If ToUpper(`INDEX_LOCATION`) == "FRONT"
{
....

 

You can avoid the whole issue altogether by defining the parameter as multi-value with only the legal values as choices in the pulldown.



knowledgeds
50+ Poster
50+ Poster
Posts:88


--
16 Nov 2009 03:02 AM  
Hello,

Also don't hesitate to use the Language Browser, available from all expression editors. Then just click in your expression, on a type, an object or a parameter. You will see types hierarchy, available methods and also all functions and methods that return given type.

Regards
BAREFTRZ
Occasional Poster
Occasional Poster
Posts:3


--
16 Nov 2009 12:55 PM  

Thanks to Cliff and Knowledgeds, I had forgotten about the Language Browser to determine available methods. Anyhow, I made the change "ToUpper" and it works but I would like the pulldown combobox option. I have the pulldown built, it pops up with the correct legal value inputs, but I can not get it to change the parameter. I tried recording a macro to use that code, but I can not get it to work in the pulldown.

Any suggestions?

CLIFFJOHNSON
500+ Poster
500+ Poster
Posts:553
Avatar


--
16 Nov 2009 01:16 PM  

From your original post I thought you were just using rules, in which case the parameter is just changed by the user.

If you want to change a value of a parameter using VB you typically must use either assign the value directly like


    theParam.Value = "FRONT"                     

which is appropriate for strings, reals, integers, and booleans. Or  use the ValuateFromString method

    Call theParam.ValuateFromString("1.25in" )                

for parameters with units

BAREFTRZ
Occasional Poster
Occasional Poster
Posts:3


--
16 Nov 2009 03:24 PM  

Thanks, In the original post, the user was required to manually interact with the parameters, but after I saw your reply (with the image), I thought I would like the option of having a combobox fired from a reaction which would force the user to input the information. Occasionally, they forget to do it manually and as a result the parameter value is incorrect. Thanks again, I will try the method you have described.

You are not authorized to post a reply.

Active Forums 4.1