Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a module-function in a chart

Can anyone help me with the following. (QV-Version 10)

In the module I have defined a function with VBScript.

In a chart I want to use this function, but this is not working.

See the attached example, this illustrates the problem.

This is just an example, in practice the function is much more complicated with more parameters.

In the sample I try (in the chart) to use the function "DoubleCount".

Why is this not working, and does anyone know a workaround?

Thanks,

Coen

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You cannot use module functions in chart expressions. You can only use module functions in script.

-Rob

Not applicable
Author

Hi Rob, thank you for answering.

However too bad this is not possible.

Is there a workaround for using a module function in charts?

IE via the load script and parameter substitution?

Regards, Coen.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can use a variable with parameters to create a function. You are limited to what you can do within a QV expression. For an example, see the QV Cookbook sample "User Defined Function example".

You can download the QV Cookbook from http://robwunderlich.com/downloads/

-Rob

http://robwunderlich.com

Not applicable
Author

Hi Rob, sorry for the late response.

I checked your UDF example, and it's clear to me.

Thanks for your help.

Regards, Coen

Not applicable
Author

thanks a £billion Rob ...