Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All.
I have an application that processes a large amount of data. Users can drill down the data by selecting fields in a Multi Box and then open a chart. The problem is that some users do not make any selections and try to open a chart that will time out on memory.
What I would like to do is force the user to make a least one selection on a few fields in the Multi Box before being able to generate the chart.
Note: Some of the fields in the Multi Box are not in the chart.
Is there a technique to prevent a chart from being generated if no selections are made in a Multi Box?
Yes. You can use calculation conditions on a chart. If the calculation condition has not been met, an error message will appear. You can even customize the error message to say that too many records were returned and that selections are needed.
You could do a count of records (if the count respecting the selection equals the count ignoring selection):
Count(FIELD) < Count({1}FIELD)
Or use GetSelectedCount, but that will only handle one field.
GetSelectedCount(FIELD)>0
For more fields you would need:
GetSelectedCount(FIELD)>0 Or GetSelectedCount(FIELD2)>0 or GetSelectedCount(FIEL3)>0...
what you can do is set a calculation condition for the chart like this:
not isnull([field name])
where the condition is only satisified where there is one selection. You could obviously AND this if you want to make sure a selection has been made in multiple fields.
You could even set it as the 'Show' condition so that it isnt even displayed until the selection is made or perhaps put the chart on another sheet where the sheet has a show condition set.
Regards,
Gordon
Thanks for the quick response. The GetSelectedCount is exactly what I'm looking for.
Thanks for your help Gordon.