Handling two related data sets

I have a number of scripts where I need to associate two sets of data. The following is a simple search-and-replace example that uses two lists:

display dialog "Enter a string:" default answer "test,test,dx"
set myString to text returned of result

set shortcutCharacters to {",", "dx", "mx"}
set replacementString to {" - ", "04.08.19", "April 2019"}

repeat with i from 1 to (count shortcutCharacters)
	set AppleScript's text item delimiters to item i of shortcutCharacters
	set myString to every text item of myString
	set AppleScript's text item delimiters to item i of replacementString
	set myString to myString as text
end repeat

In the place of two lists, it seems like this might better be done using a record. However, after playing around with this for a while, and doing some google research, I concluded that a record can’t be used for this purpose. Just to be sure, and because my knowledge of records is extremely limited, I thought I might raise the issue in this forum.

BTW, these are scripts that I use daily and I have to be able to manage them. So, at least for now, I’m pretty much limited to regular AppleScript.

Thanks.

You may use a list of lists.

display dialog "Enter a string:" default answer "test,test,dx"
set myString to text returned of result

set shortcutCharacters to {{",", " - "}, {"dx", "04.08.19"}, {"mx", "April 2019"}}

repeat with aPair in shortcutCharacters
	set {tBefore, tAfter} to aPair
	set AppleScript's text item delimiters to tBefore
	set myString to every text item of myString
	set AppleScript's text item delimiters to tAfter
	set myString to myString as text
end repeat

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mardi 9 avril 2019 mardi 9 avril 2019 03:44:16

Yvan. Thanks for your suggestion, which I like a lot. It will simplify my scripts and will make the addition and deletion of the paired data much easier.