- The set of data I've downloaded encompasses data for employees in all areas of the company.
- I want the diagram to display the data for different areas, depending on a variable (that should be possible using a set_expression)
- To enable the user to select an area and change the variable accordingly, I have made in the script two inline tables:
- "Plant" with the (numeric) values 56, 64 and 74
- "Area" with some (text) values
The formula I have for my variable is currently like this:
IF(((GetCurrentSelections(Werk) = 64) AND (TRIM(GetCurrentSelections(Bereich)) = 'Staplerstrg')), 'SS_64', 'ges')
=> When the user has made these two selections (the plant is a numeric value, I can see it in a multi_selection_box (the value is on the right)), I want the variable to hold the text 'SS_64'; Depending on that, I would then enter some more formulas in the diagram with a specific set_expression to filter my data.
Re: Problem with a diagram to display different data
I don't have those formulas in yet, so the qvw in its current state would not tell you much.
What I want to do - I have done this already, but then I was loading data from an Excel report whereas now I am querying the database itself.
- There are several areas in our company for which I want to display presence_quotas.
- In the "old version", I was loading from an Excel report which had the figures for every one of those areas
=> The challenge then was merely which of them to display.
=> I solved this by adding several clones of the same formula in the diagram, each one of which would be displayed when a variable I had for the purpose had a specific value.
=> This variable was defined by user_selections in two different selection_boxes, connected by 'AND'.
=> I want to do the same now and the current step is merely getting the variable right. It's going to become much more complex, but once I have it working in a basic form, that will do. However, it doesn't work yet.
Re: Re: Problem with a diagram to display different data
I knocked something up briefly - see attached. I think the issue was with the GetCurrentSelections, which seems to be returning all your selections (see top right box in example), thus as a piece of logic it fails.
I've replaced this in your formula with only - see the second box. This seems to work.
Let me know how you get on and whether or not this is the correct answer.