Page 1 of 1

User properties

PostPosted: Sat Aug 19, 2017 5:53 pm
by steve1376656734
I am using application.setUserProperty and application.getUserProperty to store and retrieve some information in the local storage f the NG client. This all works perfectly but I now need to delete one of the properties I previously set so that it is no longer in the local storage. Any idea how to do this as there does not seem to be any sort of application.deleteUserProperty() or application.removeUserProperty() method????

Thanks
Steve

Re: User properties

PostPosted: Mon Aug 21, 2017 12:09 pm
by mboegem
Hi Steve,

just use:
Code: Select all
application.setUserProperty('myProp', null)


You will see that:
Code: Select all
application.getUserPropertyNames()

Will no longer contain the myProp value.

Hope this helps.

Re: User properties

PostPosted: Mon Aug 21, 2017 6:51 pm
by steve1376656734
Thanks Marc - I will try that and see how I get on.

If it works I guess it means that you cannot have a user property set with a specific NULL value.

Thanks
Steve

Re: User properties

PostPosted: Mon Aug 21, 2017 10:28 pm
by mboegem
steve1376656734 wrote:If it works I guess it means that you cannot have a user property set with a specific NULL value.


Correct, but you can consider a property to have a null value as soon as it doesn't exist.
I never got into a situation where this was blocking.