# URL in Perspective

**URL:** <https://forum.inductiveautomation.com/t/url-in-perspective/66936>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 25, 2022, 4:55pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936 "2022-11-25T16:55:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh\_Giratkar](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Saurabh\_Giratkar](https://forum.inductiveautomation.com/u/Saurabh_Giratkar)\
**Post date:** [November 25, 2022, 4:55pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/1 "2022-11-25T16:55:02Z")

</div>

Hello everyone,  
I'm new with ignition and trying currently working on a project. I have a memory tag which has a string vale (string value will be different every time) ex : "[https://www.google.com/](https://www.google.com/)" I want to pass this value by using memory tag in URL. Is it possible?  
As the string value in memory tag will be different every time depending on what user inputs.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/2/3261d337d1dcd2a4542fa3e62ea43eea714b595b.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 25, 2022, 5:14pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/2 "2022-11-25T17:14:15Z")

</div>

Not in a Navigation Action. In a Script Action, you can read the memory tag, combine its value with a static fragment (if desired), and use the string as an argument to [system.perspective.navigate()](https://docs.inductiveautomation.com/display/DOC81/system.perspective.navigate).

{ For user entry, you probably should not be using a memory tag. Have the script read the text from the user input component instead. }

---

<div class="post-metadata">

**Author:** ![Saurabh\_Giratkar](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Saurabh\_Giratkar](https://forum.inductiveautomation.com/u/Saurabh_Giratkar)\
**Post date:** [November 25, 2022, 6:16pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/3 "2022-11-25T18:16:57Z")

</div>

Hi Phil,  
Can you please guide me as what you mean when you say use string as an argument?  
I know this must be a lot basic for you but I'm just getting started in this field.

Thank you

---

<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 25, 2022, 6:34pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/4 "2022-11-25T18:34:28Z")

</div>

If the entire URL is in the string memory tag, this should work in your script action:

```auto
	my_url = system.tag.readBlocking(['Some/Path/To/Tag'])[0].value
	system.perspective.navigate(url=my_url)

```

If navigating to another page within your Perspective project, you wouldn't use the `url=` format.

---

<div class="post-metadata">

**Author:** ![Saurabh\_Giratkar](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Saurabh\_Giratkar](https://forum.inductiveautomation.com/u/Saurabh_Giratkar)\
**Post date:** [November 25, 2022, 7:03pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/5 "2022-11-25T19:03:40Z")

</div>

M'I doing this right?  
This is my tag.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/80bbf57daf419fe5afa2c9ce86917d0c8425b854.png)  
and this is the way I'm using the scrip you mentioned  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6c523022f55fffe0f6cf533e5d69b303b4cc8bcc.png)

But it is not working as expected

---

<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 25, 2022, 8:24pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/6 "2022-11-25T20:24:29Z")

</div>

Your third line is indented too far. Note the red mark in the right margin signalling this syntax error. Python is very specific about required indentation (and spaces versus tabs matter).

It otherwise looks fine.

However, you seem to be attaching this event to your text area. That will produce many extra events as the user edits and positions the mouse, et cetera. You probably want this action script to be on a separate button.

Also, recall my suggestion to not use a memory tag. The script on a button could get the URL text directly from the text area's text property.

---

<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:** [November 25, 2022, 11:55pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/7 "2022-11-25T23:55:06Z")

</div>

Alternatively, you can use a tag binding to your memory tag in a custom property added to your component, then reference that custom property in the navigation action. Click on the little box with lines in it icon to the right of the url input box in the nav action to open the property selector

---

<div class="post-metadata">

**Author:** ![Saurabh\_Giratkar](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Saurabh\_Giratkar](https://forum.inductiveautomation.com/u/Saurabh_Giratkar)\
**Post date:** [November 27, 2022, 4:24pm UTC](https://forum.inductiveautomation.com/t/url-in-perspective/66936/8 "2022-11-27T16:24:08Z")

</div>

Thank you Phil.  
Yes I attached the script to button instead of text.  
Next I'm going to Try not to use memory tag. an try to use text directly from text area.  
Also I will be trying to open this url in a new page instead.  
I will try to do this if I came across issue will post here.

Also Thank you Nick, I will try to do this using binding to learn as well.

Thank you for your suggestions.
