Lava Filters - IsInDataView

Category:Other

Description:Takes the given Entity or Entity Id and returns a boolean that indicates whether the entity is in the data view or not.
Input: "CurrentPerson": { ... } "Group" { "Id": 111, "Name" : "Decker Group" ... }
Lava: {% assign inDataView = CurrentPerson.Id | IsInDataView:'1337' %} {% if inDataView %} That person is in the 1337 data view. {% endif %} {% assign inDataView = Group | IsInDataView:'230' %} {% if inDataView %} The '{{Group.Name}}' is in the 230 data view. {% endif %}
Output: That person is in the 1337 data view. The 'Decker Group' is in the 230 data view.