Can you reference complex data in a hyperformula?

Tags: #<Tag:0x00007fee37cd4b28>

I’m just starting to look at Hyperformula for our needs with a handsontable grid. Before I dive in, however, I want to know if working with complex data types is possible?

A simple example is, for a given column, we use a custom render/editor, but the data that is returned to the grid is a simple array of objects like this:
[
{id:354,data: ‘john’},
{id:142,data: ‘tim’},
{id:43,data: ‘same’},
]
Our own custom renderer displays it how we want.

I want to add a new column to the grid to add a formula. Am I able to reference this data object in my formula? Let’s say I want to create a logical formula which will look at the data in this column and show true if one of the array elements contains ‘john’ . Is that possible?

If so, do you have any working examples you could share of how I would do this?
I’m using React and use the HotColumn object to add my columns to the grid. I’m hoping I could add new columns which then reference formula’s?

Hi @mhennessy7

Do you have any progress already with the project that you could share? It would be easier to work on some example. Unfortunately, we don’t have any examples of such implementation, but it should be done by creating a custom formula function, you can read more about it here:

https://hyperformula.handsontable.com/guide/custom-functions.html#add-a-simple-custom-function

Actually, in looking at this further, we’d need to use this on the server side, as all our filtering/sorting is done server side because of large volume of data.

It looks like Hyperformula can be used in a node.js environment. Do you have a simple node.js working example of say, summing data by hyperformula? Just looking for basic syntax on passing in data, along with function and receiving return value.

Hi @mhennessy7

I asked our HyperFormula developer for an advice here. I’ll get back to you once I get any more information.

Hi @mhennessy7

I see that you also posted your question here: https://github.com/handsontable/hyperformula/discussions/1140

That’s a preferable way for us if you have an issue regarding HyperFormula as this way you will get direct help from our HyperFormula developer. I will close this topic as a duplicate.