Passing in Lists/variables from a function to a web page
Posted: Tue Jul 23, 2019 1:35 am
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.
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.