J
johno
I am stuck on how to write an expression that does the following.
I have the following two tables:
Accounts
Cases
Accounts is a list of our customers. Cases are customer service interaction.
I need to assign a "REP" to each account.
I have added a column called "REP" to the Accounts table. My challenge has
been figuring out how to assign "REP" to the Accounts table by analying the
data in the Cases table.
Here is the business logic I am trying to write in a formula.
1.) Look at all the cases related to each CUSTOMER ID.
3.) IF the account has an OPEN case add that REP.
2.) Otherwise, evaluate the date ranges and choose that REP that last worked
a case for the account.
3.) Add that instance of REP to the record with the same CUSTOMER ID in the
Accounts table.
Here is some sample data.
CASE TABLE
Customer ID Customer Name Rep Status Closed Date
1199646 CreativeArts.com Mitch Close 11/7
1199647 CreativeArts.com Joe Open
1198793 Bridge Packaging Tom Closed 1/3
1192323 Mobile Self-Storage Alonzo Closed 1/5
1192323 Mobile Self-Storage Esperanza Closed 12/8
A currently written formula would come up with the following result.
Customer ID Customer Name Rep
1199647 CreativeArts.com Joe
1198793 Bridge Packaging Tom
1192323 Mobile Self-Storage Esperanza
Thank you for all your help.
John W. O'Grady
I have the following two tables:
Accounts
Cases
Accounts is a list of our customers. Cases are customer service interaction.
I need to assign a "REP" to each account.
I have added a column called "REP" to the Accounts table. My challenge has
been figuring out how to assign "REP" to the Accounts table by analying the
data in the Cases table.
Here is the business logic I am trying to write in a formula.
1.) Look at all the cases related to each CUSTOMER ID.
3.) IF the account has an OPEN case add that REP.
2.) Otherwise, evaluate the date ranges and choose that REP that last worked
a case for the account.
3.) Add that instance of REP to the record with the same CUSTOMER ID in the
Accounts table.
Here is some sample data.
CASE TABLE
Customer ID Customer Name Rep Status Closed Date
1199646 CreativeArts.com Mitch Close 11/7
1199647 CreativeArts.com Joe Open
1198793 Bridge Packaging Tom Closed 1/3
1192323 Mobile Self-Storage Alonzo Closed 1/5
1192323 Mobile Self-Storage Esperanza Closed 12/8
A currently written formula would come up with the following result.
Customer ID Customer Name Rep
1199647 CreativeArts.com Joe
1198793 Bridge Packaging Tom
1192323 Mobile Self-Storage Esperanza
Thank you for all your help.
John W. O'Grady