1

I am using a Board view to manage team tasks. One of the fields is the AssignedTo field which is a choice field with peoples' first names. I want to color the background color of the cards based on the person in the AssignedTo field.

I have tried using the JSON view formatting but it only works for the Title field in the list. If I add

"style": {
      "background-color": "=if( [$Title] == '','#ffcccc', '#ffffff')"
    },

to the formatter, it colors the background of all the cards that have null in the title field; however, if I try this with the Priority field ( Choice) or the AssignedTo field ( another choice field), it dosen't work.

I have tried using if( [$Title.lookupValue] as well as if ( [$Title] but nothing seems to work.

NOTE: I am using format view and not format column. Any ideas would be helpful.

1
  • Did you try using correct internal name of your AssignedTo field? Try like: "style": { "background-color": "=if( [$AssignedTo] == '','#ffcccc', '#ffffff')" }. Also, make sure you have included/shown this column in your view. This is required in order to use the column in JSON formatting. Let me know if these suggestions helps you to solve your issue. Apr 14 at 5:53

2 Answers 2

1

Try below suggestions and it should work for you:

  1. Use correct internal name of your AssignedTo field in JSON.

  2. Make sure you have included/shown required columns in your list view. This is required in order to use the column values in JSON formatting.

References:

  1. Find the internal name of SharePoint column

  2. Access information in hidden columns with JSON formatting

0

Thanks, that worked for me. I had to go into the design of the list and look at all of the fields then click on the AssignedTo field. Now in the browser in the URL line there is a cryptic line of text point to the AssignedTo field. At the very end of the line is says something link ..... field name = XXXXX..... that is the system name for the AsignedTo field and That is what you use in your JSON coding.... Thanks alot

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.