Is it possible to use nested IF conditions in an action string? I have an if condition in which , if a field called contact_purpose NOT EQUALS question, it runs a rule called insp_appt. That rule does a Data Builder action which creates a text string, then runs another IF condition which, if a field called property_type is equal to Commercial, it's supposed to run a rule called commercial_insp_appt - this rule creates a second text string.
In other words, the logic is supposed to look like this (using pseudo-php)
if ($contact_purpose <> "question" {
text_string_1 = "This is a " . $property_type . "property located in " . $location;
if ($property_type == "Commercial" {
text_string_1 = "The name of the business is " . $business_name;
}
}
The way it's set up in ChronoForms, the first IF works fine - in other words, if it's not a "question" it creates the "This is a Commercial property located in Atlanta" (or, Residential, if that's appropriate). However, it never runs the second IF - even if you specify a Commercial property type, which is the trigger.
So, are nested IFs allowed? If so, what am I doing wrong?
In other words, the logic is supposed to look like this (using pseudo-php)
if ($contact_purpose <> "question" {
text_string_1 = "This is a " . $property_type . "property located in " . $location;
if ($property_type == "Commercial" {
text_string_1 = "The name of the business is " . $business_name;
}
}
The way it's set up in ChronoForms, the first IF works fine - in other words, if it's not a "question" it creates the "This is a Commercial property located in Atlanta" (or, Residential, if that's appropriate). However, it never runs the second IF - even if you specify a Commercial property type, which is the trigger.
So, are nested IFs allowed? If so, what am I doing wrong?