automatic numbering in lists

Copper Contributor

Hi - relative newbie. Not only that, but relative newbie creating a risk register using a list :)

Can someone tell me how a can configure a list in SP online so that each new item is automatically assigned its own ID i.e. so that I don't have to manually enter 'Risk 1', 'Risk 2' etc - that's going to got wrong pretty soon...

Any suggestions greatly appreciated :)

6 Replies

@jacobite the most robust method is just to use the ID column as that will always give you a unique number.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@RobElliot - thanks for taking the time to reply. Is the ID column a standard option in lists? - i don't see it...

@jacobite yes it is. Click the dropdown next to one of the column headings (it doesn't matter which one), select Column settings then Show/hide columns and select ID then click Apply.

 

showHide1.png

 

showHide2.png

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@RobElliott - many thanks. Worked perfectly.

While I have your expert ear (or eyes), can you shed any light on how I can automatically change the colour of a cell based on the value of other cells i.e. Probability (3) x Impact (4) - 12 (turns the cell red).

Easy enough in Excel, but not sure about SP online?

@jacobite and it's easy enough in a SharePoint list as well with JSON column formatting. In this example Probability is a number column with decimal points set to 0, so is Impact. RiskScore is a calculated column with the formula =[Probability]*[Impact]. Then click the dropdown next to RiskScore, select Column settings and then select Format this column. Select Advanced mode, clear everything and paste in the following JSON:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "background-color": "=if(@currentField >= 15, 'red', if(@currentField >=10 &&@currentField<15, 'gold','green')",
    "color": "=if(@currentField >= 15, 'white', if(@currentField >=10 && @currentField<15, 'black','white')",
    "padding-left": "4px"
  }
}

 

 

 

 

 

That will result in this:

riskScore.png

 

Of course you can change the parameters, colors or add more if you need to.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@RobElliott sincere thanks for such a detailed and helpful response. Much appreciated.