Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.
Submissions are now open for the 2026 Adobe Experience Maker Awards
SOLVED

How to clear profile script local variable

Avatar

Level 3

Hello.
I have a profile script where I create a local variable using 
user.setLocal('name', 'value');
Is it possible to remove this varialbe as if it was never created before instead of using this approach ?:
user.setLocal('name', undefined);

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@kirill_techZone AFAIK it isn't possible to remove/delete it. The alternative is as @Gokul_Agiwal is to set it with an empty string or set a 'null' value.


I share weekly Adobe tips on LinkedIn—connect with me!

Every Wednesday: "Something a client recently asked..."

LinkedIn Profile

View solution in original post

2 Replies

Avatar

Community Advisor

HI @kirill_techZone 

Could you elaborate more on the scenario why you want to remove this variable? 

Have you tried with empty string like user.setLocal('name', ' ');

Avatar

Correct answer by
Community Advisor

@kirill_techZone AFAIK it isn't possible to remove/delete it. The alternative is as @Gokul_Agiwal is to set it with an empty string or set a 'null' value.


I share weekly Adobe tips on LinkedIn—connect with me!

Every Wednesday: "Something a client recently asked..."

LinkedIn Profile