# Perspective: Buttons to set session custom property

**URL:** <https://forum.inductiveautomation.com/t/perspective-buttons-to-set-session-custom-property/37851>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [August 18, 2020, 12:38pm UTC](https://forum.inductiveautomation.com/t/perspective-buttons-to-set-session-custom-property/37851 "2020-08-18T12:38:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 18, 2020, 12:38pm UTC](https://forum.inductiveautomation.com/t/perspective-buttons-to-set-session-custom-property/37851/1 "2020-08-18T12:38:22Z")

</div>

Not sure if this is obvious… but I have below where I want to be able to select an item from the dropdown menu which is bound to a session custom property. However, I also want to allow the user to use the two left/right buttons to set the session property as well, where it would essentially set it to the next/previous item in the dropdown menu list and wrap around at the ends. I know how to do this in Vision, but Perspective scripts run on the gateway hence can’t be used here… Not sure how else to do it?

I may end up doing this slightly differently and using the carousel component instead, but I’m still interested in the solution otherwise.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dd5e14e3221634b985aa82b57b9869598764370c.png)

Edit: Turns out the scripting option worked… I guess magic happens that passes in the session id and hence i’m able to modify client session props despite not being able to run the script locally on the client?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 18, 2020, 1:17pm UTC](https://forum.inductiveautomation.com/t/perspective-buttons-to-set-session-custom-property/37851/2 "2020-08-18T13:17:27Z")

</div>

> [@nminchin](#):
>
> I guess magic happens

Yes. Perspective event scripts, while they run on the gateway, run in a thread context that has access to the session.
