Storing data in a user profile

You can store certain Properties of your users in the user profile. 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.

1. Prepare Data item User

Users list

  1. Add the True or false property Active. This defines whether a user is active or not (whatever you mean by that).
  2. 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.

2. Two ways to Filter a User flow Page based on Preferences

There are two ways to handle this setting in User flows.

  1. 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.
  2. 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 active users

Show passive users:
Show passive users

Show all 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).
Filter users Flow part

  1. The Input is the current user.
  2. The Decision:

Decision

  1. Depending on the value in the decision, create a filtered Look-up list. Give all Look-ups the same name.
  2. Add an Output: the Look-up.

Step 2: create the User flow My preferences

In this flow, you can change your Preferences.
My preferences

Step 3: create the User flow Show users using my preferences
Show users using my preferences

Because users are special in Triggre, there are two ways to achieve that:

  1. Use the Wizard and select User management. Modify that according to your wishes.
  2. Or create an Empty user flow, based upon Data from a data item.

The User flow uses your Preferences and the user Properties.

  1. Between Start and Users, add the Flow part Filter users. The input will be: Current user.
  2. 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.