How to fetch the first element of a sharepoint list in case of custom order

JánosK 20 Reputation points
2025-02-24T14:24:48.13+00:00

Dear All,

I have been redirected to ask my question here.

I was asking chatgpt also was googling, but couldn't find the solution.

I have a sharepoint list with custom order.

In this list we have names and we always drag manually the order with that who is the next in the row.

I would like to do 2 things in the system:

  • Use custom background coloring on that field who is on the top always.
  • In case of a new post in a specific channel an e-mail should be sent or mentioning should happen for the person who is on the top. I would use Power Automate for this purpose.

However after some digging i found that i cannot fetch the first element of the list in case of custom order? Is that true? Or is there any solution?

In this case it looks like to me that the custom order is only a visualization nothing else.

Thanks in advance!

SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
635 questions
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 29,686 Reputation points Microsoft Vendor
    2025-02-25T07:57:37.8366667+00:00

    Hi @JánosK ,

    Good days, thank u for posting there!

    For the first thing:

    Is the field who is on the top always the first row item? If so, you can use JSON view formatting to add background color. Specific steps:

    1. Add a numeric order column for auxiliary marking. Fill in 1 for the value at the top and leave the rest blank.

    02251

    1. Click All Items-->Format current view-->Advanced mode to enter the view formatting interface. Fill in the following statement:
    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/row-formatting.schema.json",
    "additionalRowClass": "=if([$Order0] == '1', 'sp-field-severity--severeWarning', '')"
    }
    
    1. Click Save. And the result is as shown:

    02252

    Note that the internal name of the column is used.

    Reference:

    List layout customizations

    For the second thing, as I don’t know what the value of a new post in a specific channel you mentioned is, there is no way to determine the trigger condition. But you can still use the value in the Order column as a judgment condition to send emails to users who meet the conditions. Since Power Automate is not currently supported in the Q&A forum, for more details on this issue, we recommend that you go to Power Automate Community start a new discussion so that you can get more target support!

    Please do let us know if you have any further queries.

    Kindly consider accepting the answer if the information provided is helpful. This can assist other community members in resolving similar issues.


0 additional answers

Sort by: Most helpful

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.