Jump to content

Going to custom layout depending on username


MikeAir
 Share

This topic is 2857 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

 

I have made this simple inventory system for internal use, however there are different users who needs to see different layouts.

 

Is it possible in any way to send the users to different layouts when they log in?

 

So that user1 => LayoutA & user2 => LayoutB

 

Have been googling for some time now, but with no help so far..

 

Thanks,

 

Mike

Link to comment
Share on other sites

there are different users who needs to see different layouts.

 

Why would such arrangement be necessary? Normally, the identity of a user as such should not be a factor - otherwise you will find yourself having to design a layout for each new employee.

 

Perhaps you mean to steer each class of users to a layout determined by their account's privilege set? That would make more sense. And perhaps even that's not necessary, and you can use only their privileges to control what they can see and/or do on the same layout.

  • Like 1
Link to comment
Share on other sites

Hi Mike,

 

Usually, the duplicate-layouts-for-different-users approach is tedious to maintain, requiring you remember replicating every little change to the other layouts.  Layouts can be multi-user and even multi-privilege, as Comment points out, by using Hide, popovers, filtered portals, tab controls, sliders, custom menus.  With a backbone of the User's privilege set, duplicate layouts aren't needed.

 

If the layouts are completely different then the employee should belong to a 'class' or job title (in their employe record) which corresponds to their privilege set.  In this way, all employees with the privilege set of Sales can be directed to a Sales layout.  Most times, however, a single layout can (and should) service multiple Users.

Link to comment
Share on other sites

To be more specific, one of our partners need to see which items that are available in the inventory, and we(in my firm) need to update stock information when new items are bought, and to see a list of the requested items from our partner.

 

Layouts:

 

Inventory-list (partner)

Order-formular (partner)

Order-list (our firm only)

Inventory-list 2 (our firm only)

Purchase-update (our firm only)

 

My plan was to create navigation buttons manually, so that our partners only have the possibility to navigate between the two pages they need to see.

 

Edit:

 

Thanks LaRetta, i think the hide function would do the job in this particular case. But how do i 'interact' with the username in a calculation?

Edited by MikeAir
Link to comment
Share on other sites

>

 

NOTE: always try new things in a copy of your database until you get the hang of it, them make changes to your working database.

 

Simple Answer...

 

In the calculation dialog box there is a "View" dropdown list in the upper right corner.  Select "Get Functions".  The command you are looking for is Get(AccountName) which returns the account name of the currently logged in account.

 

As previously mentioned create an opening script and then under File > File Options > Script Triggers Tab > OnFirstWindowOpen option assign the opening script to that event.

 

Let's say you have two layouts one for Partners and one for Form Members.  The script would use the following logic to take the user to the correct layout.

 

IF(Get(AccountName) = "Partner")
Go To Layout (PartnerIventory)
End

IF(Get(AccountName) = "Firm")
Go To Layout (FirmInventory)
End

 

********************************************************************************

 

More complex answer...

 

Select File > Manager > Database > Security and open the Security dialog box.  It has 4 tabs Accounts, Privileges, Extended Privileges, and File access.  Accounts is where you setup the users and the privileges they have.  Alway keep the Admin account for your use during development.  The Privileges Set tap is where you control what things the users can do.

 

On the Privileges Set tab duplicate the [Data Entry Only] option and then click Edit, give it a new name like "Partner".  Then save and click Edit again.  Under the Data Access and Design section there are 4 options: Records, Layouts, Value Lists, and Scipts.  Open the dropdown list for Layouts and select Custom Layout Privileges to open that dialog box.  Here you can select what layouts that Privilege Set is allowed to see.  If you assign Layout = View Only and Records = Modifiable then the user of that privilege set will be able to "See" that layout and view/update records.  If you assign Layout = View Only and Records = View Only then the user of that privilege set will be able to "See" that layout and only view data (not update).

 

Combining a Custom Privilege Set with the opening script actions of getting the account name and going to a specified layout means your users only get to the layouts you say they can get to.

 

>>>>

Link to comment
Share on other sites

This topic is 2857 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.