Forum Discussion
SharePoint Online List: complete automatically the last field when insert "New item"
- 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)
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)
Thank you BRO!
Is exactly that I mean!
Now when the "Code" exist in the list Power Apps return an error not user frendly 🙂
SharePoint default form said something like the item exist ..
We can change this error returned by Power Apps form in something other?
"Network error when using Patch function: The requested operation is invalid." is not so attributable about "the item already exists"