Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/* calendar.cmp */
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute
        name="myFilters"
        type="Object[]"
    />
    
    <B25:multiCalendarWrapper
        calendarId="Resources"
        view="week"
        startDate="2020-12-31"
        hiddenDimensionFilters="{!v.myFilters}"
    >
    </B25:multiCalendarWrapper>
</aura:component>

/* calendarController.js */
({
  doInit: function (cmp, event, helper) {
    var recordId = cmp.get('v.recordId');
    cmp.set('v.myFilters', [
        { 'fieldName': 'B25__Is_Active__c', 'operator': '=', 'value': 'true'},
        {
            type: 1,
            logicalOperator: 'OR',
            subFilters: [
                { 'fieldName': 'Name', 'operator': '=', 'value': 'Awesome'},
                { 'fieldName': 'Name', 'operator': '=', 'value': 'Nice'}       
            ]
        }
    ]);
  }
})

Multiple Values

For use cases where checking against multiple values is required, the IN and NOT IN keywords can also be utilised. For Example:

Code Block
/* calendarController.js */
({
  doInit: function (cmp, event, helper) {
    var recordId = cmp.get('v.recordId');
    cmp.set('v.myFilters', [
        { 'fieldName': 'B25__Is_Active__c', 'operator': '=', 'value': 'true'},
        {
            type: 1,
            logicalOperator: 'OR',
            subFilters: [
                { 'fieldName': 'Name', 'operator': 'IN', 'values': ['Awesome', 'Nice', 'Terrific']}
            ]
        }
    ]);
  }
})

Anchor
Passing-Dynamic-Filters
Passing-Dynamic-Filters

...