0

How to display an array

Good afternoon to everyone,

 

I have an array of names (John, Jim, Joe) and I want to display it on a layout not as a text field but as... an array in fact. Like a spreadsheet where each rank is a name.

Regards

7 replies

null
    • magnificent7
    • 5 yrs ago
    • Reported - view

    And to be even more precise : I have an array of records and I want to display it on a spreadsheet where every row is a record/

    • Sean
    • 5 yrs ago
    • Reported - view

    Have you tried the "View" layout element? You can display an array in a formula field, but if you want a spreadsheet format the "View" would be better.

    • magnificent7
    • 5 yrs ago
    • Reported - view

    thank you for your answer.

    I have just tried to use the formula to show an array. It works but it not display as a column.

    So I have tried to use the "View" and for now, I don't succeed to display an array.

    If you have another hint...

    But thank you very much,

    • Sean
    • 5 yrs ago
    • Reported - view

    I think the "View" will only display data from a table using the "select" statement. If you are not getting your array values from a table you can use this function to display the array in columnar form...

     

    join(yourArray, "

    ")

     

    Just use enter/return between the quotes.

    • magnificent7
    • 5 yrs ago
    • Reported - view

    thank you again.

    Since my array is not coming from a table, the "view" seems not a good choice so.

    In fact, I need to make manipulation from time to time to this array (add an element, delete one) and I am looking for a way to save it somewhere. The formula seems a good idea but I can't change it with a trigger (since it's a formula).

    I keep looking.

    • Sean
    • 5 yrs ago
    • Reported - view

    If you want your array to be persistent and editable, I suggest you use a table. There aren’t any minimum requirements for how many fields or records a table contains.

    • magnificent7
    • 5 yrs ago
    • Reported - view

    Thank you very much.

    I will do it