Hello,
I'm working on a Qlik Sense mashup application with AngularJS, and I'm facing a challenge related to calculated expression evaluation. I have a scenario where I want to calculate the count of distinct clients based on a certain expression. Before performing an action, I need to evaluate the client count and take different actions based on the result.
Here's a simplified version of what I'm trying to achieve:
I have a button in my mashup application that triggers a filtering action using a calculated expression. Before applying the filter, I want to calculate the count of distinct clients using an expression. If the calculated client count is above a certain threshold (let's say 20,000), I'd like to display a pop-up message to the user indicating that they need to select a smaller number of clients. If the client count is below the threshold, I want to proceed with the filtering action.
I've attempted to use the createGenericObject method to evaluate the expression and retrieve the client count, but I've encountered challenges in getting the actual calculated value from the response.
Here's my current js code:
This is not returning the first console.log.
I would greatly appreciate any guidance or suggestions. Thank you in advance for your help and insights.
Best regards,
Irene