Hi all,
I was wondering if anyone has any ideas on how to solve this. I have a flow that writes several outputs in excel, one excel file per country.
I've added this flow to the server, so the country specific contacts can run it for their country. So they have a dropdown, select their country and get the excel file as output file.
This works, but I want to make it better. I want someone either to only be able to select their own country in the list or to get no output file (an error message if possible) if they select a different country.
I found a way here on the community to get the login from the users and I can make a list for which country each login/user is responsible.
How would you handle this?
Kind regards, Tienemientje
Solved! Go to Solution.
If you can read the user name and convert this to a country, you can remove the country interface tool completely. Just get the login name, join to a user/country table to get the country and then use the country as a filter in your workflow
Dan
Hi @danilang , thank you for your comment.
Yes, I also thought of that one, but I have a few people that are responsible for more than 1 country. I could group those, but it would be nicer if they could somehow still choose for exactly which country they would like to run the flow.
Other flow where I would like to add the same principle is one that should only be ran by one or two people. If you are not in the user list, and you run it, you should not get an output or even better a sort of error message.
Kind regards, Tienemientje
You can add a reference table to the workflow and join them to match with the correct username/country.
So the user selects the country and writes their username and password or some kind of code. Then the workflow compares this username/password and the country to the info on the embedded reference table, if it matches, the join will work, if it does not, the J output will be blank and then you set up a logic to give you an error message afterwards if there are no joins.
It's tricky to do if you want some people to be able to select only one of multiple countries. One way you could try is to build a chained app. The 1st app gets the user name and then writes a .yxdb with the list of allowed countries for that user. The second app populates the country drop down from the .xydb.
You can use the same principle for your second requirement as well. In the 1st app add a Message tool that is set to error if the user is not in the approved list with a security violation message. Configure the 1st app to Cancel Running Workflow on Error in its Runtime config. If you have Alteryx Server you can just put the workflow in collection and restrict access to the collection.
Of course all the methods can be circumvented if the user has Designer and can open the workflow. In this case you might want to consider encrypting the workflow which makes it run only with no ability to edit it. Make sure you save a copy because the encryption is one way. You can't unencrypt it yourself to make changes
Dan
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |