# Different main page for each user

**URL:** <https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 3, 2020, 12:54pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859 "2020-02-03T12:54:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitchel.Gommers](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mitchel.Gommers](https://forum.inductiveautomation.com/u/Mitchel.Gommers)\
**Post date:** [February 3, 2020, 12:54pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/1 "2020-02-03T12:54:08Z")

</div>

Hello,

I have a question about the login page for each login/user. Is it possible to have a different main page (first page after login) for each user?

Thanks,  
Mitchel Gommers

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 3, 2020, 1:05pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/2 "2020-02-03T13:05:53Z")

</div>

Hi Mitchel,

You sure can! Look under _ **Project ➡ Client Events** _. Use a Client Startup Script.  
 ![2020-02-03_7-57-02](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9aa41135df1c723a84980cfc0fa32225d3881fd0.png)

Here’s one that I use. It helps monitor the amount of free hard drive space on a Windows client. It also rejects the maint\_hch user, since my maintenance guys should be logging in under their own credentials.

 ![2020-02-03_7-58-14](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/51f203526f8dfe8978088f932fdccf7c7d256d1c.png)

EDIT: Sorry, should mention that in here you would use the system.nav.openWindow() or similar to do what you’re asking. 🙂

---

<div class="post-metadata">

**Author:** ![Mitchel.Gommers](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mitchel.Gommers](https://forum.inductiveautomation.com/u/Mitchel.Gommers)\
**Post date:** [February 3, 2020, 1:42pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/3 "2020-02-03T13:42:14Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![Mitchel.Gommers](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mitchel.Gommers](https://forum.inductiveautomation.com/u/Mitchel.Gommers)\
**Post date:** [February 12, 2020, 6:33am UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/4 "2020-02-12T06:33:07Z")

</div>

The script that I wrote don’t work. When I log on as Operator 51 I don’t get the right page.

name = system.tag.getTagValue("[System]Client/User/Username")  
if name == ‘Operator51’  
System.nav.openWindow (‘IS machine 51’)

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forum.inductiveautomation.com/u/pascal)\
**Post date:** [February 12, 2020, 10:13am UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/5 "2020-02-12T10:13:44Z")

</div>

Did you type your script with the correct INDENT ?  
For example here is a script i would use to read a tag and print something if the tag’s value equals another value.

```auto
test=system.tag.getTagValue("Sometag")
if test==1:
	print test

```

You could try running your script from the Script Console in the designer so that you can see if there are any errors in it.  
Try to write the value ‘Operator51’ in the [System]Client/User/Username tag. Then type this code in the Script Console :

```auto
name=system.tag.getTagValue("[System]Client/User/Username")
if name=='Operator51':
	print 'Open IS machine 51'

```

---

<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:** [February 12, 2020, 12:40pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/6 "2020-02-12T12:40:48Z")

</div>

Don’t capitalize the “system” in `system.nav.openWindow()`. And the line with the ‘if’ needs a trailing colon. Look in your diagnostic console on the client to see the syntax error. Finally, when pasting code in this forum, place three back-quotes (these: ```) on a line above the code and again below the code to trigger proper formatting. Then we can see if you’ve used proper indentation.

---

<div class="post-metadata">

**Author:** ![Mitchel.Gommers](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mitchel.Gommers](https://forum.inductiveautomation.com/u/Mitchel.Gommers)\
**Post date:** [February 13, 2020, 2:34pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/7 "2020-02-13T14:34:29Z")

</div>

I have tried and it worked, it printed the text in the script console. But when I want to open the window I get an error

I use this code:

```auto
if name=='Operator51':
nav.openWindow ("IS machine51")

and I get this error:

SyntaxError: ("mismatched input 'nav' expecting INDENT", ('<input>', 3, 0, 'nav.openWindow ("IS machine51")\n'))
```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 13, 2020, 2:59pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/8 "2020-02-13T14:59:22Z")

</div>

The error says it all. You need to indent anything you want to use in your ‘if’ statement:

```python
 if name=='Operator51':
    nav.openWindow ("IS machine51")

```

---

<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:** [February 13, 2020, 3:12pm UTC](https://forum.inductiveautomation.com/t/different-main-page-for-each-user/31859/9 "2020-02-13T15:12:50Z")

</div>

In case it isn’t clear from the other comments, indentation is how python identifies the boundaries of nested code blocks, for `if` statements and loops and exception trapping–everything. Proper indentation is _ **mandatory** _ in python.
