Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use the following expression to display the Primary Contact as a column so that each individual only has one line of data in a straight table.
=If ([Contact Type]='Primary', [Contact], '-')
But since an individual can have more than one contact type, this only works when the client has ONLY a primary contact or no contact. In this example, only Client "2" would return a Contact name, all others would return "-" because the Contact Type is not "equal" to "Primary".
load * inline
[Client Code, Contact Type, Contact
1, Primary, Susan
1, Secondary, Martha
2, Primary, Alex
3, Primary, David
3, Secondary, James
3, Emergency, Mary];
Is there another way to write this?
Alternatively, I have had success in similar cases with the following expression:
count({<AGE={'18','19'},GENDER={'M'}>} NAME)
but in this case I don't want to calculate anything, I just want the data in the field to display.
Hi Tania,
This table's expression will show all the Primary contacts for the clients.
Client Code | =Concat({$<[Contact Type] = {'Primary'}>}Contact,',') |
---|---|
Alex,David,Susan | |
1 | Susan |
2 | Alex |
3 | David |
Regards
Andrew
Hi Tania,
This table's expression will show all the Primary contacts for the clients.
Client Code | =Concat({$<[Contact Type] = {'Primary'}>}Contact,',') |
---|---|
Alex,David,Susan | |
1 | Susan |
2 | Alex |
3 | David |
Regards
Andrew
Perfect! Thank you!