Forum Discussion

andreagx's avatar
andreagx
Copper Contributor
May 20, 2023
Solved

SharePoint Online List: complete automatically the last field when insert "New item"

Hello,  I would like to complete automatically the last field when insert "New item" like a kind of calcualted flield. i.e:  Field "Code SL" should be: first 3 char on "Profumo" + "Form".  The fi...
  • RobElliott's avatar
    May 21, 2023

    andreagx you don't need to do it with anything complicated like a Powershell script, it is very easy with the built-in functionality. Make your form a Power Apps customised form as in the image below where the Profumo column in the list is a choice column and so is the Form column. The Code column just needs to be single line of text. In the form I've renamed the fields to dataProfumo and dataForm respectively. Then in your code field change the default property from Parent.Default to Left(dataProfumo.Selected.Value,3)&dataForm.Selected.Value

     

    If you don't want your users to change the code then set the DisplayMode of the dataCode field to View.

     

    You can see it working on the attached video.

     

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

     

Resources