I have a very simple list that contains two columns:

EmployeeName(Person or Group); Leave Balance (Single line of text)

Example: EmpList

What I want to achieve is the below:

  1. How can I format this list to display the data in a card or gallery view by including the employee profile picture and his current leave balance?
  2. I want to embed that list to an SP page what is the best way to show only the current user signed in record that exists in that list? Should I leverage item-level permission and assign it to the needed user or is there another way?

Can please someone provide an example based on the above concerns?

Any help is highly appreciated.

Thank you!

2 Answers 2

  1. In your view menu, choose Gallery. This will generate the default tiles and add an asterick to your view name
  2. In the view menu, choose Save view as. Save with the same name. This will make the view default to the Gallery view from now on
  3. In the view menu, choose Format current view
  4. Choose Edit Card in the Card Designer option enter image description here
  5. Configure which columns you want to show and adjust any details such as the column names or showing/hiding the profile picture then click Save enter image description here
  6. You can always go to Advanced Mode if you want detailed control, but you'll be entering the world of list formatting with JSON which may be more than you're looking for now.
  7. In the view menu, choose Edit current view. This will bring up the classic view editor. Leave everything as is except in the Filter section choose Show items only when the following is true. Person Name is equal to [Me] then click OK to save enter image description here
  8. While editing a page, add the List webpart and choose your list. Then in the property pane choose the correct view, size, and display options. Because you are using the [Me] filter only one item should be shown at a time and it will be dynamic to the user currently viewing the page. enter image description here
  • 1
    Hello Chris, thank you so much for providing an example and explaining in detail all the steps needed. Btw the chicken made my day 😂
    – SmithBZ
    Dec 17, 2021 at 6:02
  1. As a starting point, you can use the in-build Card Designer to create a very basic card without having to write the JSON code.

enter image description here

  • Format current view

enter image description here

  • Choose Gallery layout then edit card

enter image description here

  • Select your PersonName field and show preview
  • Select your Leave Balance field
  • Put them in the order you'd like

You could then switch to advanced mode and tweak the JSON code to suit your needs.

  1. Personally I would leverage Item-level permissions to keep it as secure as possible. However if that isn't a concern, you could simply add a filter to your view where your PersonName field is equal to [Me]. This would hide it from others but it wouldn't actually prevent a capable person from accessing this information if they were sufficiently motivated. enter image description here
  • Thank you so much for providing an example and explaining in detail all the steps!
    – SmithBZ
    Dec 17, 2021 at 6:01

Your Answer

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

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