Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Below script not working when passing dynamic year in mashup (JavaScript section).
app.field('reporting_year').selectMatch('year(today())', true);
Please help on this.
i believe this will pass the acual string and Qlik wont evaluate it. you should pass the actual year as determined in your code. here is one way:
app.field('reporting_year').selectMatch(new Date().getFullYear(), true);
app.field('reporting_year').selectMatch(String(new Date().getFullYear()), true);
depending on what you want to pass num or string
i believe this will pass the acual string and Qlik wont evaluate it. you should pass the actual year as determined in your code. here is one way:
app.field('reporting_year').selectMatch(new Date().getFullYear(), true);
app.field('reporting_year').selectMatch(String(new Date().getFullYear()), true);
depending on what you want to pass num or string
Thanks @edwin , Below script worked.
app.field('reporting_year').selectMatch(String(new Date().getFullYear()), true);
np