Search code examples
palantir-foundry

Foundry Slate text box layout


I have a function that returns a list of items separated by commas (see picture).
I would like to know how to display this in the same view as the function.
The default text box or list just puts it all one line.

enter image description here

The desired view would be:

25-0545-8-0008 TASK, B777, MAINT DEVICE NETWORK UPDATE,
99-0505-8-0009 INSP, *ETOPS VERIFICATION FLIGHT RQD -PCI DUE,
25-0524-8-0041 TASK, B777-224, BACKUP GEN OIL/FILTER CHANGE - ER,
25-0572-8-0283 TASK, GE90B, ENGINE INSP- ER,
25-0524-8-0200 TASK, B777, ENG IDG OIL/SCAVENGE FILT REPL ER

I have tried all widgets and some line break options with no help.


Solution

  • The Widget you are displaying the data in is expecting HTML, so you need to provide HTML to be formatted correctly.

    For example the below should work:

    var myArrayOfStrings = {{my_function}}
    return return myArrayOfStrings.join('<br>');