Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
jacobesalas
New Contributor III

Get Current Selections for CYC group

Something is wrong with my format.

I want my expression to be an if statement based on the Dimension from the cyc group.

My expression is as follows:

If(Match(GetCurrentSelections([Date Cyc]), 'Scheduled'),

sum(DailyHours))

expression.jpg

The error says "Bad field name."  Date Cyc is the name of my Cyclic Group. and Scheduled is the label for the expression in that group.

Any help would be greatly appreciated.  Thank you in advance.

3 Replies

Re: Get Current Selections for CYC group

I think you might be looking for GetCurrentField(). GetCurrentSelections() doesn't take any arguments:

If(Match(GetCurrentField([Date Cyc]), 'Scheduled'), Sum(DailyHours))


GetCurrentField ‒ QlikView

jacobesalas
New Contributor III

Re: Get Current Selections for CYC group

snap.jpg

Thanks for the quick response.  It says that the expression is okay, but the red error underline is contradicting that.  So there is no data to display in the chart.  Do have some syntax wrong?

Re: Get Current Selections for CYC group

Did you try clicking okay to see if the expression is giving you the output you were looking for. I think this is an issue for GetCurrentField() function. Expression editor doesn't recognize it, but it works. You can also try this since you are checking for just one field:

If(GetCurrentField([Date Cyc]) = 'Scheduled', Sum(DailyHours))