2

I have slate dashboard which uses fusion sheet for backend data and fusion service api/fusion queries to retrieve data from fusion sheets.

I want write data into fusion sheet with one of the column having array type of data.

Does anyone knows how to write back array data type into fusion sheet using fusion query?

What I tried

giving this payload to fusion query result in error Invalid argument

data = {
rows: [
    "columnID" : {
    "type": "untypedString",
    "untypedString": ['a','b']
}
]}

giving this payload to fusion query it writes data as it is (I thought it will be interpreted as array in fusion sheet cell)

data = {
rows: [
    "columnID" : {
    "type": "untypedString",
    "untypedString": "=array('a','b')"
}
]}

WHAT I WANT to write array data in fusion sheet

harsh2702
  • 27
  • 3
  • 2
    Just a pointer for other folks potentially coming across this question, if you're looking to do general "app-building with data write-back" in Foundry, I'd strongly recommend connecting your datasets into the Ontology and controlling the write-back with Actions rather than using a direct API call from Slate as is demonstrated here. For specific purposes or in a legacy situation, this API-based approach could be the right one, but for general write-back the Ontology-based approach offers more granular controls and a more robust, easier-to-use feature set. – Logan Rhyne Jan 03 '23 at 09:37

1 Answers1

0

Could you try with this :

    {
        "rows": [
            {
                "columnID": {
                    "type": "cellValue",
                    "cellValue": {
                        "type": "stringArray",
                        "stringArray": [
                            "A", "B"
                        ]
                    }
                }
            }
        ]
    }

Instead of this :

    {
        "rows": [
            {
            "columnID": {
                "type": "untypedString",
                "untypedString": "test"
                }
            }
        ]
    }

For reference, this is possible to find it in the dev docs, by looking at the specific query you are using and the objects it can take as arguments.

ZettaP
  • 719
  • 7
  • 11