Forum Documentation Showcase Pricing Learn more

Search for users doesn't retrieve all records


#1

Hi all,

I feel like I’m stuck with quite basic question. I’m trying to send email notification to a list of users when another user changes profile. I thought it should be dead simple. I followed this forum thread: How to send out email to set of Users that meet a criteria?
and came up with a workflow like this:


(I removed all the constraints from search for testing purposes)

I also have a few records in the database:
image

But to my disappointment when I run this workflow in debug mode I only see one record, matching current user:

Is there any implicit constraint limiting the scope of records when a search for users is performed?

Any helpful thought is highly appreciated. Thank you!


#2

There is no limiting constraint when searching Users. Do this quick test:
-Create a text field anywhere on your page
-Set the content to be: Search for Users´s email join with “,”

You should get a list of all your user emails separated by commas.

if you´re not getting your complete list of Users, something funny is going on


#3

Thank you for your suggestion.
I tried to test it with the text field as you suggested and observed the same 1 email for the current user. Then I realized that privacy settings could’ve limit resultset so I adjusted them to make sure that all user data are visible to everyone. And it worked just fine! So now my problem is resolved, however I am still unsure about the workflow… from the last paragraph of “Privacy & Security” section of the manual I’ve got an impression that workflow settings have precedence over privacy rules, but apparently it does not work this way at least in some cases.


#4

What the manual says is that “Privacy rules do not apply to modifying data through workflows”. In your case you are not modifying data. What you are doing is first searching for a list of users and then sending them an email. Searching is an action governed by privacy rules.

What a workflow would allow a user to do is to change or save data regardless of privacy rules. Say for example that your users are related to Company in your app. You could set rules so Users of Company A can only view (through searches and repeating groups) data for Company A, and the same for Users of Company B, they would only view data of Company B.

But a workflow could allow a user of Company A to create data for Company B even though a privacy rule could prevent the user from seeing/searching data for Company B. But this is so only if you want it to. In this hypothetical workflow, the way you would prevent user from Company A to create data for Company B is through conditions and event actions.

For example when User A is creating or editing data you would set conditions such as: Change User A´s Company´s (A) Data. So in this case any change the User makes will always be done to their company data and not any other else.

Makes sense?


#5

Yes, this makes perfect sense. Thank you!


#6

you´re welcome!