Skip to main content
Question

How to create lists of entries in a single field?

  • September 4, 2020
  • 0 replies
  • 43 views

Currently, two of my tables include aliases for individuals and organizations. So at the top of each record I have the fields Name and Aliases. Name is just as regular text field, while Aliases is currently a multi-line field, as sometimes a person or organization has multiple different names/different spellings of names.

Users are supposed to separate each alias with a semi-colon. However, to my endless annoyance, many don't, using new lines or commas.

I was hoping for a workaround for this problem. I was thinking one solution would be a system to only allow the generation of one alias at a time, a bit like a multiselect field. However, a multiselect field would make everyone's aliases available to all the records, which I don't want.

Is there another option I'm not thinking of? Some other sort of way to create manual lists within a single field?

(I should add that aliases are not something we want to track in a separate table).



------------------------------
Sam
------------------------------
This topic has been closed for replies.

  • Registered
  • September 4, 2020
I know you said you do not want to track them in a separate table but this is exactly what that is for with a relationship. That way you could have an unlimited amount of aliases and also control exactly how they are written there.

What is the reasoning for not wanting to do this in a separate table? Maybe there is an issue you have with it than can be overcome.

One think you might do is just anticipate that they will use characters other than a semi-colon and replace them with the semi-colon.

The formula for the "Aliases (formula)" field walks through each anticipated incorrect separator and replaces it with what we want.

var text replaceCommasAndSpaces = SearchAndReplace([Aliases (separate with ";")],", ",";");
var text replaceSpacesAndCommas = SearchAndReplace($replaceCommasAndSpaces," ,",";");
var text replaceCommas = SearchAndReplace($replaceSpacesAndCommas,",",";");
var text replaceSemiColonsAndSpaces = SearchAndReplace($replaceCommas,"; ",";");
var text replaceSpaces = SearchAndReplace($replaceSemiColonsAndSpaces," ",";");
var text addBackSpacesAfterSemiColon = SearchAndReplace($replaceSpaces,";","; ");

$addBackSpacesAfterSemiColon​


------------------------------
Forrest Parker
------------------------------