Recently I was able to create a line chart within Lansa with the help of Chartjs. I have a widget, a reusable part, and a web page that accomplishes this.
I created the widget/reusable part so the calls to various methods that create the chart mainly have lists as parameters. Now that I have the chart created (and building the various lists on the web page itself) I need to call the function that creates the real data for my chart. I tried just passing in this function on the reusable part and on the web page but I get errors. Specifically: "The CALL command is not supported on the Web." Then, I tried adding the Reusable Part to a standard form and got the error of: "testChartjsInterface is only supported on the Web."
I did some digging around and looked into Server Modules but I don't know if this is the best route to take (and there weren't a whole lot of resources on them).
In short, I am looking for a way to pass in lists generated by a function to a web page. And then from there, those lists create a graph.
Passing in Lists/variables from a function to a web page
Re: Passing in Lists/variables from a function to a web page
Your reusable part should call a server function to get the data.
Art Tostaine
Re: Passing in Lists/variables from a function to a web page
A function or Srvroutine? Using the Use Builtin(CALL_SERVER_FUNCTION ... gives the error of "The USE command is not supported on the web."
Re: Passing in Lists/variables from a function to a web page
This example shows some simple client side code calling a server module to get a list back:
https://docs.lansa.com/14/en/lansa017/i ... 1_0500.htm
https://docs.lansa.com/14/en/lansa017/i ... 1_0505.htm
https://docs.lansa.com/14/en/lansa017/i ... 1_0500.htm
https://docs.lansa.com/14/en/lansa017/i ... 1_0505.htm