Add [gv_math] filter by logged in user
When doing calculations for GF entries with [gv_math] it would be great, if the entries the calculation is based on, could be limited to the currently logged in user.
3
votes
![](https://secure.gravatar.com/avatar/2f2b9f791b81f42c077edfb36d04dd14?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Hi Thomas,
You can use the `filter` attribute on the shortcode to filter by logged-in user.This will filter out entries that don't have a user associated with them:
`[gvmath scope="view" filter="filter_created_by=0&op_1=isnot"]`This will limit entries to currently logged-in users (requires GravityView because of the {user} Merge Tag):
`[gvmath scope="view" filter="filter_created_by={user:ID}&op_1=is"]`Read more: https://docs.gravityview.co/article/295-math-shortcode#filters