Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

To Lower Case Values

Avatar

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

167 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

167 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile
marion33678522
Level 7

13-07-2018

Hello Adobe Community,

IIs there a simple way to get all values to lower case ? spetially for the SDK ? like a plug in or something ?

Cheers !

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile
StewSchilling
MVP

15-07-2018

Here's a new AA plugIn function that should do the trick.

Drop this function into your aa custom code with your other plugins.

//AA Plugin - forceLowerCaseMulti 1.0.0 - Stewart Schilling : Search Discovery Inc. : 7/15/2018

//When called, all s.props, s.eVars, s.listVars, s.pageName, s.channel, s.hier, and s.products

//values will be forced to lower case.

//The 's' object must be passed into the function.

s.forceLowerCaseMulti = function(s) {

  function filterS(key){

      var keyMatch=new RegExp(/(^eVar[0-9].*)|(^prop[0-9].*)|(^hier[1-5].*)|(^list[1-3].*)|(^pageName$)|(^channel)|(^products$)/);

      return (key.match(keyMatch));

  };

  Object.keys(s).filter(filterS).forEach(function(key){

    if (typeof s[key]==="string"){

        s[key] = s[key].toLowerCase();

    }

  });

};

Call it at the end of your doPlugins function like so:

s.forceLowerCaseMulti(s);

Answers (3)

Answers (3)

Avatar

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile
StewSchilling
MVP

31-07-2019

SHIRINL26

This should do the trick:

Avatar

Avatar
Boost 1
Level 1
SHIRINL26
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
SHIRINL26
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
SHIRINL26
Level 1

23-07-2019

Hi

We used your code I think its lowering the dynamic variables as well

for example  - we are duplicating evar1 = prop1 and when we see the values pass in the debugger its showing as evar1 - d=c1. "D" has to be in uppercase. When seeing in reports we see d=c1 as a value begin pass and not the duplicate value.

Please suggest how we can overwrite it.

Thanks

Shirin

Avatar

Avatar
Coach
Employee
ericmatisoff
Employee

Likes

152 likes

Total Posts

279 posts

Correct Reply

78 solutions
Top badges earned
Coach
Contributor
Shape 10
Shape 1
Ignite 5
View profile

Avatar
Coach
Employee
ericmatisoff
Employee

Likes

152 likes

Total Posts

279 posts

Correct Reply

78 solutions
Top badges earned
Coach
Contributor
Shape 10
Shape 1
Ignite 5
View profile
ericmatisoff
Employee

13-07-2018

Processing Rules would be your best bet here and unfortunately they don't have a toLowerCase style functionality. Although I think that's a great forum idea for you to submit (hint hint).

For web:

DTM/Launch have the ability to set clean text and lower case in data elements, which I would recommend.

You could consider coding a solution in doPlugins that checks through the variables in the s object and applies toLowerCase to them one-by-one. I'm not familiar with a plugin that does this automatically.

For app:

I'm similarly not aware of a 'plugin' for the SDK that does this. Sounds like it might be worth your while to build one though.

Hope that helps!