Solved

Combining text and data within the same text box

  • 6 December 2023
  • 8 replies
  • 79 views

Userlevel 4
Badge

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.

icon

Best answer by wmatthews1877 6 December 2023, 12:47

View original

8 replies

Userlevel 7
Badge +12

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.

 

Userlevel 4
Badge

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. 

Badge +18

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

Userlevel 7
Badge +12

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([SOOrder.OrderType ] = ‘IO’, ‘international@ourcompany.com’, ‘sales@ourcompany.com’), ‘text’)

Userlevel 4
Badge

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.’

Userlevel 4
Badge

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.😀

Userlevel 7
Badge +8

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! 

 

Userlevel 4
Badge

Thank you for taking the time to respond and including your article. 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved