Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Community,
I am trying to create a sheet trigger that will apply a filter using a variable that I have created (either from the load script or created on the front end). The variable 'vLast6Months' (shown below) calculates the last 6 months and sets a date field column to those values:
='(' &date(AddMonths(monthstart(today()),-5),'MMM-YY')& '|' &date(AddMonths(monthstart(today()),-4),'MMM-YY')& '|' &date(AddMonths(monthstart(today()),-3),'MMM-YY') & '|' &date(AddMonths(monthstart(today()),-2),'MMM-YY') & '|' &date(AddMonths(monthstart(today()),-1),'MMM-YY') & '|' &date(AddMonths(monthstart(now()),0),'MMM-YY')&')'
I have confirmed the variable is working as expected and can be applied via a button click, but for some reason it is not working when I try doing the same thing using a sheet trigger. Here is a screenshot of what I have applied for the sheet trigger:
Has anyone gotten this to work?
Try using the Dollar sign expansion
=$(vLast6Months)
Hi Lisa,
I tried using =$(vLast6Months) but that did not work. Does it make a difference if I create the variable in the load script vs the front end?
Thanks