We have a modified sales order form with a text box in the header. The content to the customer is the main part of the text. Depending on whether the sales order is international or not, depends on the email address embedd in the text. For example, if the order is international, then the customer will be directed to email international@ourcompany.com, if not international, then sales@ourcompany.com. I’ve tried googling it, looking at Augforums and have come up short. Any help will be appreciated. My other thought is to have two different forms, one for international, one for other, but I’d rather use one if possible.
It sounds to be me like what you want in the form is the IIF condition for that field
IIf( expr, truePart, falsePart )
So think like IIF(Email = international@yourcompany.com, ‘International Text, ‘’)
You could use substring on the email to read the first number of characters to see if they are international etc.
That part I have down, but that formula needs to go into the text box with the ‘Dear Customer….
If you have any issues please email us at
=IIF(=SOOrder.OrderType ] = ‘IO’, ‘international@ourcompany.com’, ‘sales@ourcompany.com’). Is it possible to combine both text and conditional data fields within the same text box.
Hello,
Building on what DComerford noted, something like this might work (I didn’t look up the real customer address country field, fyi) --
=“Please send questions to”+ IIF(+CustomerAddress.Country] <>’US’, ‘international@yourcompany.com’, ‘domestic@yourcompany.com’)+”.”
Laura
Can you not put the formula outside the text so
=IIF((SOOrder.OrderType ] = ‘IO’, ‘Dear Customer, blah, blah email is international@ourcompany.com’, ‘Dear Customer, blah, blah email is comsales@ourcompany.com’).
In saying that i think if you use the Concat function you can do something line as well.
Concat(‘Dear Customer’, =IIF(CSOOrder.OrderType ] = ‘IO’, ‘international@ourcompany.com’, ‘sales@ourcompany.com’), ‘text’)
I would like to share with the community what I came up with recommended by laura02, and dcomerford.
=’Dear Customer, …….
For faster service email’ + ‘ ‘ + IIF(SOOrder.OrderType] = ‘IO’, ‘international@ourcompany.com’, ‘sales@ourcompany.com’ + ‘ ‘ + ‘or call at the phone number listed above.’
I could have put a space after the word “email” and one before the “or” but it looked cleaner with the single apostrophe before and after the IIF statement. It works like a champ.
Looks like you have the answer you need however I have a write up that evolves conditionally combining text and data in the post below.
The approach should work well in report designer even though it was originally conceptualized for generic inquiries.
Hope this helps you or the next person!
Thank you for taking the time to respond and including your article.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.