Storing data in a user profile
You can store certain properties of your users in the. An example: whether they are active or not.
You also can store certain preferences of yourself in the data item. An example: whether you prefer to see only the active users, the passive users or all users.
Both are described below.
Prepare data item user
Add the True or false property Active. This defines whether a user is active or not (whatever you mean by that).
Add the Pick list Show me these users. Add these items to the pick list: Active, Passive, All. This property defines which users you are normally interested in when you open a user flow.
Two ways to filter a user flow page based on preferences
There are two ways to handle this setting in user flows.
Option 1: If you use the filter in just one or two user flows, you can build the filters in the page and use buttons. You can change your preference by pressing a button and the page reacts on it right away.
Option 2: If you use the filters in multiple flows, it might be more convenient to create a flow part that filters the data. Instead of creating buttons in every user flow, you call the flow part that does the filtering. If you create a “My settings” user flow in which you can change his preferences.
Option 1: filter inside the user flows using buttons
Create three buttons:
“Show active users”:
“Show passive users”:
“Show all users”:
Every button calls the Flow part Update user that changes the preference accordingly.
The page Filtered users uses this filter:
Show me these users = Active and Active or (Show me these users = Passive and Active = false) or Show me these users = All
Option 2: filter using a flow part
Step 1: create the flow part "Filter users".
The output is a list of the users that match your preference (current user’s preference, actually).
The input is the current user.
Depending on the value in the decision, create a filtered look-up list. Give all look-ups the same name.
Add an Output: the look-up.
Step 2: create the user flow "My preferences"
In this flow, you can change your preferences.
Step 3: create the user flow "Show users using my preferences"
Because users are special in Triggre, there are two ways to achieve that:
Use the wizard and select user management. Modify that according to your wishes.
Or create an empty user flow, based upon Data from a data item.
The user flow uses your preferences and the user properties.
Between Start and users, add the Flow part Filter users. The input will be: Current user.
Optional: create a button that connects to the user flow My preferences where you can change your filter settings.
When you open the user flow, it will display the users according to your preferences.