Welcome Guest

Pages: 1 2
Formatting values
kettykruegerPostNovember 19, 2021, 15:23
Newbie
Posts: 7
Registered:
November 11, 2021, 09:10
Normal topicFormatting values

Oh sorry, I was just trying to show an example of what I was trying to achieve. Am I on the right tracks with the 'Replace' and 'With' fields? Essentially, with the Genre field, I want to replace instances of 'Rock' with 'R' etc.

kettykruegerPostNovember 19, 2021, 15:30
Newbie
Posts: 7
Registered:
November 11, 2021, 09:10
Normal topicFormatting values

Ah sorry, I was just trying to show an example.

On bulk, I'd like to replace 'Rock' with 'R', 'Heavy Metal' with 'HM' etc. This is for the genre field.

2MR2PostNovember 19, 2021, 15:54
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicFormatting values

If you select the Genre field it will replace "[Rock, Heavy Metal, Thrash Metal]" with "[R,HM,TM]"

It will not change Rock to R as it looks for the 'replace' string as a unit. You have to do this with multiple replace statements. Further as there can be lots of Rock genres you should do it as a list. If your genres are delimited by commas, you could do it as follows:

1: Replace "Rock", case insensitive in the Genre field, as list with delimiter "," with "R"
2: Replace "Heavy Metal", case insensitive in the Genre field, as list with delimiter "," with "HM"
3: Replace "Thrash Metal", case insensitive in the Genre field, as list with delimiter "," with "TM"
4: Trim the Genre field, as list with delimiter "," (SP) [Leading] [Trailing]

The 'Trim' statement is only required if you want to remove spaces before and after each genre.

There is an easier way to do this if you have a lot of genres to replace. Make a Replacement Set named Genre Replacements. (see attached image) and use the following:

1: Set Default Replacement set to (Genre Replacements)
2: Case No Change in the Genre field with replacements, process as list with delimiter ","
3: Set Default Replacement set to (pre-action value)
4: Trim the Genre field, as list with delimiter "," (SP) [Leading] [Trailing]

Statement 1 changes the default replacement set to be Genre Replacements. Statement 2 uses the Case statement with no case transformations but applies replacements ... again as a list. Statement 3 resets the default default replacement set. Statement 4 is the same Trim as before. Statements 1 and 3 are a Preferences statement Statement 2 is a Case. Statement 4 is a Trim statement

Image

mackzPostDecember 21, 2021, 06:34
Newbie
Posts: 2
Registered:
December 21, 2021, 11:29
Normal topicFormatting values

I think this will be my last question, 🙂 and I appreciate all your help. 🙄

Pages: 1 2
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.035 seconds.