Store appsmith value on page load?

Is there a way to store appsmith values on pageload, as opposed to having to use a widget to do this? I would like to have a number of appsmith.store variables be saved as ‘undefined’ on page load. Basically this:

{{
storeValue(“variable”, undefined);
}}

You can use a function to store the Appsmith values and configure it to run on page load. To run a JS function on page load, click on the gear icon and check the corresponding checkbox:

@Amelia - thanks! I am trying to do this but the gear icon is not showing up. Any ideas?

Looks like maybe still beta, but coming soon?

That’s right. It is already released on the cloud version and will be available very soon for self-hosted users too.

@trebuchet JS on page load today only works on asynchronous function. so just add async keyword on reset function and you should be able to see the gear.

reset: async () => {

}

OK, good to know @dancia and @Amelia . I’ve preconfiged it as async and will check this functionality again once it is avail for self-hosted. Thanks!