Forum Discussion

Morgan_McGary's avatar
Morgan_McGary
Copper Contributor
Dec 19, 2022

JSON for index of group header in sharepoint list

I'm trying to format my group headers with JSON in a sharepoint list based on alternating, first, last, etc and at one point I stumbled upon it and then promptly lost it making other changes.  I've tried @rowIndex in the headerFormatter but that shows all as row 0 since each one has only one header.  Can someone shed some light on what I might have done to make this work before?

I know we can use @group combined with certain values to get some of the group information but the group's index among all the groups is eluding me.

2 Replies

  • c0-ff-ee's avatar
    c0-ff-ee
    Copper Contributor

    Morgan_McGary @rowIndex works for me inside headerFormatter. First group header is 0, next is 1, etc. Maybe try troubleshooting in a dummy list, or starting with clean format and slowly adding features back in until you see what went wrong?

    • Morgan_McGary's avatar
      Morgan_McGary
      Copper Contributor
      Can you share the example of how you are using it? Maybe I'm just using it wrong. Mine has been showing 0 for every header.

Resources