Prove a Text Attribute In an Excel Rule
In an Excel rule you can set a text attribute to the value of another attribute, or set a text attribute to blank.
Set a text attribute to the value of another attribute
When an attribute is declared as Text on the Declarations tab in the Excel rule document or on the Data tab in Policy Modeling, the value of a conclusion cell for that attribute is treated as a text value, even if the text matches another attribute. If you do not want this behavior, you can put parentheses around the conclusion and it will be treated as an expression instead.
Note that a value that is set as "auto" inside Policy Modeling does not trigger this behavior, unless the Declarations tab inside the Excel document overrides this.
For example, if you had the declarations shown in the following table:
Attribute Type | Attribute Text |
---|---|
Text | the location of the overall winner |
Text | the winner of the overall award |
Text | the winner of the award in Australia |
Text | the winner of the award in Japan |
Text | the winner of the award in the U.K. |
Text | the winner of the award in the U.S. |
you would put the text attribute’s text in parentheses, as shown below, only if you want the conclusion "the winner of the overall award" to be set to the value of the winner of the award in the particular country.
the location of the overall winner | the winner of the overall award |
---|---|
Australia | (the winner of the award in Australia) |
Japan | (the winner of the award in Japan) |
United Kingdom | (the winner of the award in the U.K.) |
United States | (the winner of the award in the U.S.) |
else | uncertain |
So in this example, if "the location of the overall winner" is Australia and "the winner of the award in Australia" is Malcolm, then "the winner of the overall award" is concluded to be "Malcolm". If parentheses were not used around "the winner of the award in Australia", then when "the location of the overall winner" is Australia, "the winner of the overall award" is concluded to be "the winner of the award in Australia".
Set a text attribute to blank
When writing Excel rules, if you leave a conclusion cell blank for a text attribute then it will evaluate to uncertain (or to the value of the alternative conclusion if there is one). If you instead want the conclusion to evaluate to an empty string, you need to use quotes "" in the cell.
For example, in the rule table below, the Carrier Country would be set to an empty string if the Airline is AeroBratsk.
Airline | Carrier Country |
---|---|
AeroBratsk | "" |
Air Corsica | France |
Belair | Switzerland |
Qantas Airways | Australia |