Set Data Object CellType in the designer

Posted by: Jean.s on 26 February 2024, 8:47 am EST

    • Post Options:
    • Link

    Posted 26 February 2024, 8:47 am EST

    Hi,

    how can I set the Data Object in the Designer in the same way I can do it from code in this example: https://developer.mescius.com/spreadjs/demos/features/cells/cell-types/data-object/purejs

    Thank you

  • Posted 26 February 2024, 10:52 pm EST

    Hi,

    It seems like the DataObject Cell Type is not yet supported through the Designer UI. I have escalated this issue to the concerned dev team for further consideration.

    The internal tracking id for the same is: SJS-22992. I will let you know when there is more info on this from the dev team.

    Regards,

    Ankit

  • Posted 27 February 2024, 12:22 am EST

    thank you for your answer Ankit.

    I have just one related question: is there any way to obtain the “metadata” for an object? I mean using for instance a function in a formula with an object parameter and returning all the nested property names. (i.e. “=Metadata(QUERY(“productTable?Id=1”,true))” ).

    thank you

  • Posted 27 February 2024, 9:02 pm EST

    Hi,

    As per my understanding, if a cell has a value containing object, you want to obtain all the “properties” of the object?

    If this is the case, you could create custom function and achieve this. Kindly refer to the following demo on Custom Functions: https://developer.mescius.com/spreadjs/demos/features/calculation/custom-functions/purejs

    If it doesn’t meet your requirement, kindly do elaborate your requirement with an example/sample so that we could have a better understanding of your use case and could assist you accordingly.

    The devs have added the support for DataObject Cell Type in Designer (through UI) to the product backlog. The internal tracking id for the feature is : SJS-23005. Also, the devs wanted to know about how you use the DataObject Cell Type and your usage. Could you also kindly clarify.

    Regards,

    Ankit

  • Posted 27 February 2024, 9:34 pm EST

    Hi,

    Ok for the custom function. I think it could also be implemented as a standard function in a future release.

    About the use the DataObject Cell Type in the designer, i do not have a specific use case, I think that this type of cell can help the user to understand the available properties of an object contained in a cell. (as can be seen in your demo: https://developer.mescius.com/spreadjs/demos/features/cells/cell-types/data-object/purejs.)

    Regards,

    G.

  • Posted 29 February 2024, 3:31 pm EST

    Hi,

    I have shared your usage of DataObject Cell Type with our developer team.

    However, regarding the function, I couldn’t clearly understand your requirement clearly. Could you kindly share us an example showing the current behavior and your expected behavior?

    If you want a function that parses an object by property, you could use the “PROPERTY” function. Refer to the following docs on “PROPERTY” function: https://developer.mescius.com/spreadjs/docs/formulareference/FormulaFunctions/other-functions/property-function#site_main_content-doc-content_title

    Sample: https://jscodemine.grapecity.com/share/nPrUaGAZNkycnlbyMID9Jg/?defaultOpen={"OpenedFileName"%3A["%2Findex.html"%2C"%2Fpackage.json"%2C"%2Fsrc%2Fapp.js"]%2C"ActiveFile"%3A"%2Fsrc%2Fapp.js"}

    If the “PROPERTY” function doesn’t satisfy your requirement, kindly do elaborate your requirement with an example. You could modify the above sample and share it with us also.

    Regards,

    Ankit

  • Posted 29 February 2024, 8:11 pm EST

    HI,

    in your example imagine I don’t know the shema (list of column names in your case) and I want to dynamically populate a dropdown list (or context menu) with that list and allow the user to see and select the desired property. How can I get the “metadata” (list of property names) of an object that can change dynamically?

    Regards

  • Posted 4 March 2024, 4:07 pm EST

    Hi,

    Kindly refer to the following sample in which I have return dynamic array from custom function as well as show all the properties by comma separation.

    Sample: https://jscodemine.grapecity.com/share/LpChvZuD8kWvG9UcxNXawQ/?IsEmbed=false&Theme=Unset&PreviewDirection=0&IsEditorShow=true&IsExplorerShow=true&IsPreviewShow=true&IsConsoleShow=true&IsRunBTNShow=false&IsResetBTNShow=false&IsOpenInCodemineBTNShow=false&PanelWidth=20&PanelWidth=50&PanelWidth=30&defaultOpen={"OpenedFileName"%3A["%2Fsrc%2Fapp.js"]%2C"ActiveFile"%3A"%2Fsrc%2Fapp.js"}

    Further, I have escalated this to the dev team to add it as an enhancement. The internal tracking id for the same is: SJS-23095. I will let you know when there is more info on this from the dev team.

    Regards,

    Ankit

  • Posted 5 March 2024, 12:33 am EST

    Very Clear,

    thank you

  • Posted 10 March 2024, 3:47 pm EST

    Hi,

    The devs have mentioned that the requested function to fetch all the keys from a JSON object is already present in the product backlog with internal tracking id: SJS-9129

    You could use the above provided solution and create custom function to match your requirements. Further, when there is more update on this from the dev team or when the feature will be available, I will let you know.

    Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels