how to display multiple symbols in JSON based on one selection?

sharepoint_json 1 Reputation point
2021-07-22T13:00:21.69+00:00

Hi all,

I would like to display the entries of a list field (selection) as symbols in a view. How does the code look like for this? Can anyone help me with this?

The goal should be that, for example, in the list field is dog, cat, mouse and in my view I then have these three symbols. But in another field it says only dog. In the view then also only the dog should appear as a symbol.

Thanks for your help

Translated with www.DeepL.com/Translator (free version)

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,740 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,796 Reputation points
    2021-07-23T06:45:34.517+00:00

    Hi @sharepoint_json , welcome to Q&A forum!

    Thought of two workarounds:

    1.Use Choice column.

    Create a Choice column and add different choices. You can choose any choices you want to display in this field. If the user only has the read permission, only the options you display can be seen.

    Authorized users:
    117365-8.gif

    Users with only Read permission are not able to make changes:
    117304-9.gif

    Reference:
    List and library column types and options

    2.Use Calculated column.

    This requires some conditions to be set. For example, I created column1, if column1=sion, then display "dog, cat, mouse", otherwise display "dog".

    =IF(column1="sion","dog, cat, mouse","dog")  
    

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.