If you want to filter out data based on userid or username, it’s possible to achieve this using %userid% or %userlogin% within the filter_data attribute. NOTE! If you’re using user-based sorting (sort_cols_userclick set to yes) or if you have search functionality on, then this filter will dissapear and show all rows based on the search (because the search functionality is based on the filter functionality).
Original
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
1 | Dett2 | Female | 36 | 16/08/2020 | Great Britain |
2 | Nern | Female | 19 | 15/10/2017 | France |
3 | Kallsie | Male | 20 | 16/08/2016 | France |
4 | Siuau | Female | 21 | 21/05/2015 | Great Britain |
5 | Shennice | Male | 22 | 21/05/2016 | France |
6 | Chasse | Female | 23 | 15/10/2018 | France |
7 | Tommye | Male | 24 | 16/08/2017 | United States |
8 | Dorcast | Female | 25 | 21/05/2016 | United States |
9 | Angelee | Male | 26 | 21/05/2017 | Great Britain |
10 | Willoom | Female | 26 | 15/10/2019 | France |
Filter data
This example below shows data based on userid – if logged in userid is 1.
Shortcode
[csvtohtml_create source_type="guess" source_files="free_testdata_10rows.csv" filter_col="sr." filter_data="%userid%" filter_operator="equals"]
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
1 | Dett2 | Female | 36 | 16/08/2020 | Great Britain |
This example below shows data below if logged in user is Siuau.
Shortcode
[csvtohtml_create source_type="guess" source_files="free_testdata_10rows.csv" filter_col="name" filter_data="%userid%" filter_operator="equals"]
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
4 | Siuau | Female | 21 | 21/05/2015 | Great Britain |