# thisInstance or context.thisInstance

**URL:** <https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876>\
**Category:** How do I?\
**Created:** [July 22, 2024, 3:44pm UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876 "2024-07-22T15:44:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauromequelussi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mauromequelussi/32/10223_2.png) [@mauromequelussi](https://community.weweb.io/u/mauromequelussi)\
**Post date:** [July 22, 2024, 3:44pm UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/1 "2024-07-22T15:44:52Z")

</div>

I know this function brings a lot of information about the elements. I didn’t find documentation about it.

But when and how to use it in practice?

Could you give some examples of use?

Can I change the value or just read values?

---

<div class="post-metadata">

**Author:** ![Corner](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Corner](https://community.weweb.io/u/Corner)\
**Post date:** [July 22, 2024, 5:05pm UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/2 "2024-07-22T17:05:40Z")

</div>

Would love to read that too !

---

<div class="post-metadata">

**Author:** ![mauromequelussi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mauromequelussi/32/10223_2.png) [@mauromequelussi](https://community.weweb.io/u/mauromequelussi)\
**Post date:** [July 23, 2024, 7:17pm UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/3 "2024-07-23T19:17:33Z")

</div>

@Joyce @jptrinh @Alexis Any guidance?

---

<div class="post-metadata">

**Author:** ![MatthewS](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/matthews/32/3582_2.png) [@MatthewS](https://community.weweb.io/u/MatthewS)\
**Post date:** [July 24, 2024, 9:00am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/4 "2024-07-24T09:00:14Z")

</div>

I’m sure there is a ton of use cases, but the two main use cases I’ve been using it for:

1. Targeting the element using it’s id.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c58c9e426710181f48690aa02f21536bb55dd890.png)

When using custom JS in a workflow and targeting the element the workflow is running on via it’s id, using thisInstance.id is handy.

1. Getting the element’s position and sizing info.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/de813f2f0554726519585d0c537295db4f414cb0.png)

You can also do this via the advanced interactions, but it can get tricky when you have an element bound to a list and you only want to target the one that the workflow is running for. I’ve found using this more straight forward.

---

<div class="post-metadata">

**Author:** ![Corner](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Corner](https://community.weweb.io/u/Corner)\
**Post date:** [July 24, 2024, 9:06am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/5 "2024-07-24T09:06:56Z")

</div>

Thanks for the reply. What I struggle to understand is how to fill it ? What does it represent exactly ? Mine is always “empty” 😅

---

<div class="post-metadata">

**Author:** ![MatthewS](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/matthews/32/3582_2.png) [@MatthewS](https://community.weweb.io/u/MatthewS)\
**Post date:** [July 24, 2024, 9:22am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/6 "2024-07-24T09:22:22Z")

</div>

In the base menu it’s always labelled as empty, but once you put in into the binding menu it’ll show it’s values  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/a056a89d0190f18e94289167f588485cb2a1aae7.png)

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [July 24, 2024, 10:00am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/7 "2024-07-24T10:00:01Z")

</div>

Same as @MatthewS  
Using it mostly when I import libraries with the NPM plugin. And then need to initialize instances on mount of my div 🙂  
 ![CleanShot 2024-07-24 at 11.59.22](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/a3048ffee3d6b5c526e8da80e45321ece0dd9064.png)

---

<div class="post-metadata">

**Author:** ![mauromequelussi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mauromequelussi/32/10223_2.png) [@mauromequelussi](https://community.weweb.io/u/mauromequelussi)\
**Post date:** [July 25, 2024, 2:25am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/8 "2024-07-25T02:25:23Z")

</div>

![Captura de Tela 2024-07-24 às 23.20.33](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/ccdb33229d74db33b5f5bc0e992c12689e2c5e88.png)  
 ![Captura de Tela 2024-07-24 às 23.20.46](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f1c885f111d80ccf544303c2a013d7278f512cd9.png)

Can I change the input Date and Time Picker parameters using thisInstance or via javascript?

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [July 25, 2024, 7:02am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/9 "2024-07-25T07:02:02Z")

</div>

It was not meant for this.  
Can you tell more on what you are trying to achieve with the Date and Time Picker?

---

<div class="post-metadata">

**Author:** ![mauromequelussi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mauromequelussi/32/10223_2.png) [@mauromequelussi](https://community.weweb.io/u/mauromequelussi)\
**Post date:** [July 25, 2024, 2:33pm UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/10 "2024-07-25T14:33:32Z")

</div>

I need to change some properties of the element that are not possible dynamically, such as “mode” (Date, Datetime…) and even if possible, I can customize something

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [July 30, 2024, 6:44am UTC](https://community.weweb.io/t/thisinstance-or-context-thisinstance/9876/11 "2024-07-30T06:44:04Z")

</div>

Got it. I guess what would answer your need would be to able to bind those properties.  
You can make a [feature request here](https://feedback.weweb.io/make-a-request/)!
