How to clear profile script local variable | Community
Skip to main content
kirill_techZone
New Participant
November 7, 2024
Solved

How to clear profile script local variable

  • November 7, 2024
  • 2 replies
  • 620 views

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);

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kandersen-1

@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.

2 replies

kandersen-1
kandersen-1Accepted solution
New Participant
November 7, 2024

@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
Gokul_Agiwal
New Participant
November 7, 2024

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', ' ');