Solved! Go to Solution.
Hi @AP_10343008,
First of all, TW.sessionStorage.clear() function doesn't accept any arguments, this function will clear ALL items in sessionStorage.
Refer to MDN document.
So you are not supposed to pass anything in the parenthesis like below.
TW.sessionStorage.clear(Op_withoutSpaces + "_" + i);
Secondly, can you try removing other code and passing hard-coded key name to TW.sessionStorage.RemoveItem("key") instead of parameter for testing purpose?
I tested both TW.sessionStorage.clear and TW.sessionStorage.RemoveItem("key") in expression and both work just fine.
Hi @AP_10343008 can you use it in the format below?
Still it is not working. I uploaded the code which written in the expression of mashup. Kindly take a look.
Anyone knows why remove item is not working in session ? Please find the code i have attached.
Hi @AP_10343008,
First of all, TW.sessionStorage.clear() function doesn't accept any arguments, this function will clear ALL items in sessionStorage.
Refer to MDN document.
So you are not supposed to pass anything in the parenthesis like below.
TW.sessionStorage.clear(Op_withoutSpaces + "_" + i);
Secondly, can you try removing other code and passing hard-coded key name to TW.sessionStorage.RemoveItem("key") instead of parameter for testing purpose?
I tested both TW.sessionStorage.clear and TW.sessionStorage.RemoveItem("key") in expression and both work just fine.