You are viewing limited content. For full access, please sign in.

Question

Question

How to force proper case on metadata (free form)

asked on July 11, 2018

Hello,

We have a metadata field that is free form.  We do not want to limit the metadata to a list.  One issue I have been seeing is some users are using all lower case, we want to show proper case.  Is there a way to clean this up and force proper case going forward? 

I saw where someone used SQL to clean this up, I could create a job to run daily to clean these up, but I am not sure if that is the best way to handle this.  Is there a workflow or quickfields process that could fix the metadata?  Any other ideas?

0 0

Answer

SELECTED ANSWER
replied on July 11, 2018 Show version history

If the fields are multi-value, you'll need to take a slightly different approach.

I would do the following:

  • Get all values of the multi-value field
  • Create a new multi-value Token
  • Use a for each value loop to iterate through the field values
    • use the token editor to save the corrected value to your new Token (append)
  • Set the field equal to the new Token and select "Replace all values"

 

You might need to make some adjustments here and there, but the overall process should get you what you want.

1 0

Replies

replied on July 11, 2018 Show version history

What is "proper case?"  What if the input is:

  • iPhone - Iphone
  • rolayne swenson - Rolayne swenson - Rolayne Swenson
  • atm - Atm - ATM
0 0
replied on July 11, 2018

Erik,

 

I would want the first letter of each word to be upper case and the rest to be lower case.  In the case of iPhone I would be fine if that changed.  Ideally with abbreviations they stay upper case.  Not sure if that is possible.

I guess what would be even better, to just make sure the first letter of every word is upper case, regardless of the case of the rest of the word.  I would be fine if IPhone was incorrect case.

0 0
replied on July 11, 2018

I would not recommend changing things directly in the database as that is not supported and a lot could go wrong.

A workflow would probably be the cleanest solution because you could pull the current value, use the token editor to enforce the capitalization rules, then save the altered value back to the field.

0 0
replied on July 11, 2018

Jason,

I am going to try this route.  I created a workflow and it works, except the fields are multi-value.  I am not getting the multi-value option when I select the field.  Any help would be appreciated.

0 0
SELECTED ANSWER
replied on July 11, 2018 Show version history

If the fields are multi-value, you'll need to take a slightly different approach.

I would do the following:

  • Get all values of the multi-value field
  • Create a new multi-value Token
  • Use a for each value loop to iterate through the field values
    • use the token editor to save the corrected value to your new Token (append)
  • Set the field equal to the new Token and select "Replace all values"

 

You might need to make some adjustments here and there, but the overall process should get you what you want.

1 0
replied on July 12, 2018

Jason,

Thanks for your help, that worked perfectly.

Rolayne

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.