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
Thomas Buchstätter
shared this idea
-
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