How to do user select the users config just one time?

I am using the users config for to filter users view, however i not wanted to allow what user modified yours config, wanted to allow the user to select only once.

0 15 632
15 REPLIES 15

You want to create an functionality where the user can see & update his/her own data only?

Almost this, I want to create a feature that the user only sees the data of your company, so when he selects your company in the user settings, I prevent it from changing that choice.

So… you would like to select the company from the list (using Usersettings) and when that’s done, you can’t change it anymore with that same device?

Exactly that, do you help me?

What if your user selects the wrong company? He would be viewing other company data (is this a problem?), and also have no way of fixing it.

So I want to do this and leave the user on alert, if he selects wrong it will be necessary to create a new user.

Rather than having the user select his/her company to view, is there a way to tie to users email to the “proper” company assignment so errors are not made? I am not clear on your use case, but was thinking an access table might create a better experience?

User email … Company

Following @Mike. No need to choose anything then… the email address would do that job.

By what I understood this would be done through a certain business domain? But some of the companies do not contain these business emails are just physical people!

If your use case is a limited set of companies to select from, and the users must be associated to a particular company, you could maintain a simple user email list with associated permitted company. You can then use a slice with ShowIf to only show records associated with that users linked company.

This works well when:

  1. the company list to choose from is known and
  2. You can pre-assign a user to a company.

Again, without really knowing your actual use case it’s a bit hard to make a good recommendation.

If you want an arbitrary user to select a single company, without any predefined control over what they can select, then you could also store that selection in the “settings” table as a preference. I just doubt that is what you really want?

Settings

But I do not know who the users are going to use, I only know the companies:
So what I’m trying to do is be able to separate the data of each vendor for their particular companies.

For example: I have company X and company Y, company X can only see the sales of its own sellers but can not see the sale of the sellers of company Y;

What i was trying to do is that when the business owner selects his name in the settings, he will not be able to change his choice. So I compare USERSETING () with the company name of each seller selected on your sale.

Don’t use user settings. Instead, use a normal table, one row per user, and record the user’s choice there when the row is added. The following Editable_If expression prevents changes after an initial save:

NOT(IN([_THISROW], FILTER("MyTable", TRUE)))

replacing MyTable with the name of this table.

Okay, but how do I select a column from the “MyTable” table?

In all likelihood, the MyTable (or whatever you call it) table will use the user’s email address (from USEREMAIL()) as the key column value (e.g., email). You can use LOOKUP() to find the current user’s row and get the user’s chosen company name:

LOOKUP(USEREMAIL(), "MyTable", "email", "company_name")

where MyTable is the name of the table, email is the name of the column storing the user’s email address, and company_name is the name of the column containing the user’s company choice.

Thank you very much, it helped me a lot.

Top Labels in this Space