Skip to main content Skip to complementary content

Importing users with filters and groups

You can import users, with related filters and groups, from external Excel files.

At the moment, Excel worksheets and field names are fixed and cannot be mapped. You must create an Excel file with your information without changing the names or positions of worksheets and columns.

You can go to Sample files and download Examples.zip, which contains an Excel file with users you can import for testing.

Adding rights to a user role

To import users, you must log into Qlik NPrinting web console as a user with Import task rights in at least one security role.

Users that are part of the Administrator role, will have Import task rights. If you apply the Administrator role to a user, they will also have all other administrative privileges.

To assign a security role only the rights required to manage the import tasks, do the following:

  1. Log into Qlik NPrinting web console as a user with the Administrator security role.
  2. From the Qlik NPrinting main menu, expand the Admin drop-down menu.
  3. Click Security roles.
  4. Click on the role you want add Import task rights to.
  5. Click on the Apps tab.
  6. Scroll to the Import task rights check boxes.
  7. Select the check box on the left of Import task to assign all import task rights to the role.

    You can also select only specific rights by selecting the appropriate check boxes.

  8. Log out of the Qlik NPrinting web console.

Import filter syntax

The first worksheet contains the filter definitions. It contains the following columns that are mapped in a fixed way. Do not change the order or the names.

  • Name: filter name.
  • Description: description (optional).
  • App: name of the app associated with the filter. The app must exist on the server.
  • Enabled: set to true if you want to create an active filter. Set to false to create an inactive filter that will be ignored during report generation.
  • Connection: name of the connection. By specifying this you can create different filters based on fields with the same names from different connections on the same app. The connection must exist on the server.
  • Values: use this column to filter string values. List them in the form [field name]={value1,value2,...}. To add values for more than one field, separate them with a comma. For example: [Country]={Italy,Germany,Spain}, [CategoryName]={Babywear, Men´s Wear, Women's Wear}. Do not insert blank spaces before and after the equal (=) symbol.
  • Numeric Values: use this column to filter numeric values. List them in the form [field name]={value1,value2,...}. For example, CategoryID={1.0,"5",8.2}. Do not insert blank spaces before and after the equal (=) symbol.
  • Formulas: use this column to calculate values to filter by using QlikView formulas. List them in the form [field name]={formula1,formula2,...}. For example, Year={Year(now()), Year(now())-1,Year(now())-2}. Do not insert blank spaces before and after the equal (=) symbol.
  • If a value/formula contains commas, use double quotes as delimiters. Example: [SalemanName]={"Jeremy Martinson, Jr.", Tom Lindwall} instead of [SalemanName]={Jeremy Martinson, Jr., Tom Lindwall}

Import user syntax

The second worksheet contains the user definitions. It contains the following columns that are mapped in a fixed way. Do not change the order or the names.

  • Email: enter a unique email address. It will be used to log in. The email address must be compliant with the HTML specification explained in the W3C page. So comments, quoted strings and special characters like []/();:'"<>, are not allowed.
  • Username: the user name that will be displayed in user interface to identify the user. It must be unique.

    If you import a user having the same name as an existing user, the import will work, and the imported user will overwrite the existing one.

    If you import a user having the same name as an existing entity that is not a user (for example a group), you will get an error. The same symmetrical error will happen if you import a group having the same name as an existing user.

    For example, importing a user called "Demo" will cause an error if a group called "Demo" already exists. If this particular error happens, it will be explained in the log.

  • Password: the password for the imported user.
  • Domain Account: specify a domain only if you want to link the user with a domain account. The domain account must to be unique among all users.

    A user must have an associated domain account to use the following features:

    • Receive reports in Qlik Sense hub.
    • Create On-Demand reports in QlikView.

      The user's Windows Active Directory user account must be associated as the domain account.

  • Enabled: set to true if you want to create an active user. Set to false to create an inactive user that will be ignored during report generation.
  • Time Zone: all reports are scheduled according to the time zone for a user. Be sure to type the name as it appears in Qlik NPrinting interface.
  • Locale: you can assign to a user one of the following locales:
    • En for English
    • Es for Spanish
    • Fr for French
    • De for German
    • Pt for Portuguese
    • Ja for Japanese
    • It for Italian (starting from 17.2.1)
    • Zh for simplified Chinese (starting from 17.2.1)
  • NickName: optional value.
  • Title: optional value.
  • Company: optional value.
  • Job Title: optional value.
  • Department: optional value.
  • Office: optional value.
  • Filters: list of filters for a user, separated by commas.
  • Groups: list of groups for a user, separated by commas.
  • Roles: list of roles for a user, separated by commas.

Limitations

When importing users with groups, roles, or filters:

  • If groups, roles, or filters added in the row for a user do not exist, they will be ignored.
  • If the name of a filter, user, or role contains commas, use double quotes as delimiters. Example: "Jeremy Martinson, Jr."

  • If the name of a filter, user, or role contains double quotes or leading/trailing spaces, you must start and end the string with double quotes. Double quote characters must be inserted twice in order to differentiate them from escape quotes.

    Example:

    • [Country]={" Italy, France ", "Germany",Spain} => " Italy, France ","Germany","Spain"
    • [Country]={"""Italy"""} => ""Italy""
  • In order to import a field with leading/trailing spaces, it must start and end the string with square brackets.

    Example: [ Country ]={Italy}, CountryBorn ={Italy} => " Country "={Italy}, "CountryBorn"={Italy}

  • You cannot insert "[", "]" and "=" as field names or "{", "}" as field values.

  • Adding fields (values, numeric values, or formulas columns) with a valid name and an empty values list, lets you delete an existing filter field, if the Update filters if modified check box is selected.

    Example:

    • [Country] => input ignored
    • [Country]={} => filter field with name country removed

Import group syntax

The third worksheet contains the group definitions. It is composed of the following columns that are mapped in a fixed way. Do not change the order or the names.

  • Name: mandatory name of the group you want to create.
  • Description: optional value.

Creating an import task

Do the following:

  1. Select Tasks in the Qlik NPrinting main menu, and then select Import Task.
  2. Click Create import task.
  3. Insert the Name of the task. For example, enter Import Users, Filters and Groups.

  4. Specify the path of the import file. For example, use C:\ProgramData\NPrinting\Imports\NP_Web_Imports.xlsx.

    Note that this refers to the path on the Qlik NPrinting Server where the Excel file with the users to be imported is saved. It is not the file path on your local computer.

Setting import actions

Do the following:

  1. Select the check boxes that specify the actions that you want to be performed by the task.
    • Create users if not present
    • Update users if modified
    • Remove users added in a previous run of this task, if not present in the import file

      By checking this option, only users added in a previous run of the same import will be removed. Other users, for example the ones manually added, will not be removed.

    • Remove filters added in a previous run of this task, if not present in the import file

      By checking this option, only filters added in a previous run of the same import will be removed. Other filters, for example the ones manually added, will not be removed.

    • Replace existing user associations (filters, roles and groups) with those in the import file

      By checking this option, existing associations with filters, roles, and groups will be removed if not present in the import file. Otherwise new associations will extend them.

    • Replace existing filter fields with those in the import file

      By checking this option, existing filter fields will be removed if not present in the import file. Otherwise they will added in addition to existing ones.

    • Create filters if not present
    • Update filters if modified
  2. Leave the Enabled check box selected.
  3. Click Create to confirm.

Running the task manually

The green bar at the top of the form confirms that the task was successfully created.

Do one of the following:

  • Click Run now to immediately import the users, filters and groups.
  • Use Triggers to schedule the execution of the task.

Execution logs

If the tasks completed successfully, you will see Completed in the Last execution status column. Otherwise, you will see Failed. You can check the logs by clicking on the Download link in the Last import log column.

If an error occurs during the import, the log file will show the error message in the current locale of the computer where the import was executed. The import for all users will halt at the first error, and everything is rolled back for all users.

The column Last execution shows the date and time of the last execution.

Check the imported users on the Users page to see newly created users. You can check that associated filters were created by opening the Filters tab.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!