Formulas in For Email Body Failing Mysteriously
I use a Formula URL to generate an Outlook email. In the body portion, I define various text variables up front, and then inline those as needed.
Everything was working just fine. Then I decided to add a new text variable (e.g. var text Mytext = "foo...") and include that text in the body as $Mytext &...., and now it fails. Specificaly, when I call the text then the email simply does not generate at all; in other words, clicking on the button in QB to generate the email does nothing. I know the button formula for the mailto action works, along with the subject line portion. What fails is the body portion.
The text does not have any special characters. I've tried multiple approaches. First, tried reducing the length of the text, and did find that there seems to be a limit around 360 chars. Ok. So I broke up the text into 2 sentences, each much shorter than that limit. Call them MyTextA, MyTextB . I can get MyTextA to work, but when then add a line to include MyTextB, the formula fails. I note that the text vars are combinations of raw text and previously defined text vars, which in turn are based on the values in text fields in the database.
Schematically this is what I'm doing:
var text TextA = [field1];
var text TextB = [field2];
var text MyTextA = "foo" & $TextA & "more foo" & $TextB;
var text $Letter="yaa dah yaa dah yaa had";
var text $Final="blah blah blah";
If([field3]="yes", $Letter, (If([field4]="yes", $Final & "%0D%0A" & "%0D%0A" & $MyTextA,$Final))) &"%0D%0A" & "%0D%0A" &
The nested if statement works fine, and will correctly print either Letter, Final or {MyTextA and Final}, depending on the values of field3 and field4. Now if I add $MyTextB like this:
If([field3]="yes", $Letter, (If([field4]="yes", $Final & "%0D%0A" & "%0D%0A" & $MyTextA & MyTextB,$Final))) &"%0D%0A" & "%0D%0A" &
or even simply put in line immediately after the if statement as
$MyTextB &....
then the formula button fails. Nothing, no email generated at all. Remove the addition of $MyTextB, and everything works again.
Now with further testing I find this: If I set MyTextB to 13 characters like "xxxxxxxxxxxxx" then it works. But if I add a 14th character, the formula fails. And only, I have more text that follows the above text blocks what works just fine.
Thanks,
------------------------------
ROBERT SACHS
------------------------------