Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join text in a group and leave other text as is

Status
Not open for further replies.

jlr123

Technical User
Feb 24, 2014
117
US
Need to join two text results in my group. The following represents what I want to do with these two texts and leave the other text results alone.
if GroupName ({AR_InvoiceHistoryHeader.ShipVia})="UPS GRD"
then GroupName ({AR_InvoiceHistoryHeader.ShipVia})="UPS GROUND"
else GroupName ({AR_InvoiceHistoryHeader.ShipVia})= GroupName ({AR_InvoiceHistoryHeader.ShipVia})

Your help is much appreciated.
Thanks.
 
You need to do it before grouping, rather than after grouping,

//@group_by
if {table.field} = 'UPS GRD'
THEN 'UPS GROUND'
ELSE {table.field}

Then you group by that formula instead of the field.
 
I am not sure what you are trying to achieve. But one, assignments use the :=, second. you cannot assign GroupName ({AR_InvoiceHistoryHeader.ShipVia}) a value. But you can have a formula (in most cases) for a group. Maybe something like this,

if {AR_InvoiceHistoryHeader.ShipVia}="UPS GRD"
then "UPS GROUND"
else {AR_InvoiceHistoryHeader.ShipVia}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top