# Perspective Session Props:

**URL:** <https://forum.inductiveautomation.com/t/perspective-session-props/63992>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 13, 2022, 7:12am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992 "2022-09-13T07:12:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunpathe](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@gunpathe](https://forum.inductiveautomation.com/u/gunpathe)\
**Post date:** [September 13, 2022, 7:12am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/1 "2022-09-13T07:12:43Z")

</div>

Hi there! This is Ganapathi.  
I’m facing some serious problem in session props attribute. An attribute named “host” is not listing under the session props (occasionally its disappearing). However, when I close and re open the ignition app it is listing. If you guys have any workaround for this.

Software version : 8.1.20

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 13, 2022, 8:17am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/2 "2022-09-13T08:17:53Z")

</div>

1. Is this happening in _Designer_ or in the browser?
2. If you bind a label on a view to `session.props.host` does it stop working (a problem) or keeps working (not a problem)?
3. Why is it a serious problem? What are you doing with the host prop?

---

<div class="post-metadata">

**Author:** ![gunpathe](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@gunpathe](https://forum.inductiveautomation.com/u/gunpathe)\
**Post date:** [September 16, 2022, 11:10am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/3 "2022-09-16T11:10:12Z")

</div>

Hey Hi,  
This is happening in designer only. I have one requirement on IP based which was proposed and successfully executed.  
I have utilized this attribute in script, if this attribute disappeared/hidden, my script wont work and would throw an error like “attribute named host is not available”

---

<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:** [September 16, 2022, 12:32pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/4 "2022-09-16T12:32:47Z")

</div>

The designer is not a complete Perspective environment (nor Vision, either). Some things only work in real clients.

---

<div class="post-metadata">

**Author:** ![gunpathe](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@gunpathe](https://forum.inductiveautomation.com/u/gunpathe)\
**Post date:** [September 19, 2022, 10:09am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/5 "2022-09-19T10:09:42Z")

</div>

Whatever you said is ok, but it is working whenever the host attribute is available.  
my problem here was, “why this attribute is disappearing itself from the gateway?”

Is it a bug or we should not the utilize the session attributes ?  
I was experiencing this bug since V8.1.16

Hi @pascal.fragnoud, need your help on this

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 19, 2022, 10:16am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/6 "2022-09-19T10:16:53Z")

</div>

Well the same issue occasionally pops up for me as well, I can’t help with that…  
Instead of reopening the designer, you can simply re-add the property, it should keep its binding.  
Adding another property also usually brings back the disappeared one…

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 19, 2022, 3:20pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/7 "2022-09-19T15:20:04Z")

</div>

I’d be interested to see the script which is failing, and also the circumstances under which this prop is supposedly disappearing. It’s a system-level property, meaning it can’t be written to by scripting/bindings. The only potential time I would think it could ever not exist is if the browser/designer is being blocked by the OS - which I’ve never personally encountered.

---

<div class="post-metadata">

**Author:** ![gunpathe](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@gunpathe](https://forum.inductiveautomation.com/u/gunpathe)\
**Post date:** [October 3, 2022, 5:22am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/8 "2022-10-03T05:22:14Z")

</div>

Hi cmallonne,  
Thanks for the reply.  
The script which am using isn't a complicated one. It would check the local IP based on the conditional logic. While execution, 'host' attribute is disappearing like a ghost.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 3, 2022, 3:05pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/9 "2022-10-03T15:05:21Z")

</div>

> [@cmallonee](#):
>
> I’d be interested to see the script which is failing

Still this.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Amrutkar](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Gaurav\_Amrutkar](https://forum.inductiveautomation.com/u/Gaurav_Amrutkar)\
**Post date:** [November 18, 2022, 6:30am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/10 "2022-11-18T06:30:05Z")

</div>

Hi There! This is Gaurav.  
I am also facing same issue where perspective Session.Host property & some session custom properties disappears from designer after updating project.  
I tried to run my perspective application with above situation and faced an error popup message of "session property object is missing". But my logic is still working and giving expected output as well.  
So, what could be the reason for such a behaviour of session properties?

Software version : 8.1.20

---

<div class="post-metadata">

**Author:** ![gunpathe](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@gunpathe](https://forum.inductiveautomation.com/u/gunpathe)\
**Post date:** [November 21, 2022, 9:59am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/11 "2022-11-21T09:59:13Z")

</div>

Hi guys, just adding you in this thread  
@cmallonee @pturmel @Transistor

---

<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:** [November 21, 2022, 1:17pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/12 "2022-11-21T13:17:44Z")

</div>

> [@gunpathe](#):
>
> just adding you

Please don't. I read everything, so this just doubles an item in my notifications. When I don't answer, it generally means I have nothing helpful to add.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 21, 2022, 1:36pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/13 "2022-11-21T13:36:47Z")

</div>

Same here. (And remember that we're not getting paid for this!)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 21, 2022, 1:51pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/14 "2022-11-21T13:51:54Z")

</div>

> [@cmallonee](#):
>
> > [@cmallonee](#):
> >
> > I’d be interested to see the script which is failing
> 
> Still this.

Still this, probably

---

<div class="post-metadata">

**Author:** ![Gaurav\_Amrutkar](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Gaurav\_Amrutkar](https://forum.inductiveautomation.com/u/Gaurav_Amrutkar)\
**Post date:** [November 22, 2022, 9:54am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/15 "2022-11-22T09:54:11Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/a/ba507d3c3d1c5da70cfb6bebb01f2c26eb3ab185.png)  
Here, I have added script for reference. This script is written in session custom prop. So, whenever "host" disappears then this script fails and throws error.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 22, 2022, 10:03am UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/16 "2022-11-22T10:03:24Z")

</div>

I guess you could make it persistent to work around the issue:

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

---

<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:** [November 22, 2022, 1:23pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/17 "2022-11-22T13:23:37Z")

</div>

I would call that the solution, not a work-around.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Amrutkar](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Gaurav\_Amrutkar](https://forum.inductiveautomation.com/u/Gaurav_Amrutkar)\
**Post date:** [November 23, 2022, 2:43pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/18 "2022-11-23T14:43:13Z")

</div>

Hi,  
Thank you for work around.  
But I can not make session custom prop persistent because its value changes based on trigger, I have binded it to one of the tag. When value changes to '1' then script written on session prop should run.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 23, 2022, 2:45pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/19 "2022-11-23T14:45:07Z")

</div>

Being persistent doesn't prevent it to be dynamically evaluated.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 23, 2022, 3:57pm UTC](https://forum.inductiveautomation.com/t/perspective-session-props/63992/20 "2022-11-23T15:57:37Z")

</div>

Is your script failing because of a missing `host` property, or is it failing because of a reference to `self.info`? I'm not familiar with `self.info`.

I would expect an error like this with your script even if `self.props.host` is present:

```auto
AttributeError: 'com.inductiveautomation.perspective.gateway.script' object has no attribute 'info'

```

So what error/exception are you encountering, @Gaurav_Amrutkar? Or if no error is being encountered, what value are you receiving for `self.props.host`? Empty string (`""`)? None/null?

[Next page](https://forum.inductiveautomation.com/t/perspective-session-props/63992.md?page=2)
